Leaving this private for now, so we can address all of the testing
issues. Once we decide on the best ergonomics, this can be moved to
a public API.
Bug: skia:11209
Change-Id: I030e223d8cbd16438d9dfd518af41e1a7269b6dc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/550701
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
This isn't truly necessary since the observed timeout cases will, eventually, complete. But, philosophically, it seems better to signal an error if the path wasn't fully processed.
Bug: oss-fuzz:48278
Change-Id: I8ca5ef37c8ac9d9a5acf9ee34b597b571ca9f8e5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557096
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Bug: skia:13118
Change-Id: I0d4f1a679ca3108bbea8f65a6395305c38b49679
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/555008
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Name changes and file moves to follow.
Change-Id: I8750cbc357da5050cd0f508fbb181fb2cf27ec18
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557376
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Bug: skia:13118
Change-Id: Ie7ad50cbbcc5ad43b9cdcb206aa42698b40a44b6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/555007
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Bug: skia:13118
Change-Id: I0b8ca489820f9d8a155362cff012c7b3a64d337d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/555006
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Clang recently added this warning which flags inconsistencies between
array parameters in function declarations.
Bug: chromium:1343303
Change-Id: Id0432e19f241abfb566787c440e01e185d7f17d4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557336
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Extract the functionality of using either SkStrikeForGPU*
or sk_sp<SkStrike> for handling descriptors from either RemoteStrike
or from SkStrike. This will be used by the PathOpSubmitter and
DrawableOpSubmitter in the future.
Change-Id: I672ac9439a62c0485ac44b0a676640c30042e076
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557056
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Putting the dictionary in the Recorder itself was not very useful; the
recorder is inaccessible throughout the call chain of pipeline setup.
The ResourceProvider, on the other hand, is accessible everywhere we
need it, hangs directly off the Recorder, and has the right lifetime
for our purposes.
Change-Id: I0f494e5890845d73343a71359900598d63b66764
Bug: skia:13405
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/556917
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
The following code handles this case cleanly: The bounds don't fit in
fixed-point, so we fall back to treating the triangle as a path. The
path code drops the primitive for being non-finite.
Bug: oss-fuzz:48319
Change-Id: Icca7a2c8b3b8d3a67931cc6736a2fb216fb831d9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/556608
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: I5968031db59dec77450336ff9879cccf448c2eaa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/556604
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Change-Id: I16544e81c170b38d97a1f7716e4fc5bb4aa05721
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/556607
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
numAxes check changed from != 0 to < 0, G3 build fix by updating bazel
files for skdiff to include SkMetaData, now with file name typo fixed.
Use this new tool in the COLRv1 GM test for creating sliders in the GM
UI if the test font provides variable axes. Preparation for testing
variable COLRv1 fonts while developing this feature in FreeType.
Bug: chromium:1311241
Cq-Include-Trybots: luci.skia.skia.primary:Canary-G3
Change-Id: I2a24fed2c46e1edc85ca45080db5b54a5c15b6bf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/556936
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Dominik Röttsches <drott@chromium.org>
Commit-Queue: Dominik Röttsches <drott@google.com>
GrBackendTexture accepts an optional label param. Currently it was
passed only to Gl backend. This CL extends the scope and pass the
optional param, that comes from external clients, to other backends
like Dawn, Mtl, D3D etc.
Bug: chromium:1164111
Change-Id: Ibcaa3f7b3a1e294c5ab68e2a621df43c8c714d7a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/556757
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This has been replaced by findOrCreateRuntimeEffectSnippet.
Change-Id: I26e1f85c74071b14b75ab86410e4cc30a81bf873
Bug: skia:13405
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/552716
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
This reverts commit 663ec474bb.
Reason for revert: Breaking G3 roll
Original change's description:
> Reland: Add ToolUtils helper for generating GM UI sliders for variable fonts
>
> numAxes check changed from != 0 to < 0, G3 build fix by updating bazel
> files for skdiff to include SkMetaData.
>
> Use this new tool in the COLRv1 GM test for creating sliders in the GM
> UI if the test font provides variable axes. Preparation for testing
> variable COLRv1 fonts while developing this feature in FreeType.
>
> Bug: chromium:1311241
> Change-Id: I8c81fe211031d5fa144a5462eac333fee2bcc8aa
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/556837
> Auto-Submit: Dominik Röttsches <drott@chromium.org>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
Bug: chromium:1311241
Change-Id: I68013c7722c8e0cfe38ea316d7ad051815fa1e32
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/556916
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Robert Phillips <robertphillips@google.com>
We no longer use the pre-baked runtime-effect snippet from the
ShaderCodeDictionary; this will be removed in a followup.
Change-Id: I9862da264e4aec723a1a6792e8f086e3eca4d4b1
Bug: skia:13405
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/553577
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
This used to be Ganesh-specific, but is now available to us in Graphite.
Change-Id: I7557787fa652aeaaf2a555e4ea465d90f58bf337
Bug: skia:13405
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/556603
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
numAxes check changed from != 0 to < 0, G3 build fix by updating bazel
files for skdiff to include SkMetaData.
Use this new tool in the COLRv1 GM test for creating sliders in the GM
UI if the test font provides variable axes. Preparation for testing
variable COLRv1 fonts while developing this feature in FreeType.
Bug: chromium:1311241
Change-Id: I8c81fe211031d5fa144a5462eac333fee2bcc8aa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/556837
Auto-Submit: Dominik Röttsches <drott@chromium.org>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Large startAngle values (combined w/ an almost 360 sweep angle) can
cause an infinite loop in angles_to_unit_vectors in the loop that
tweaks the stop vector.
Bug: oss-fuzz:19916
Bug: oss-fuzz:48241
Change-Id: I914aac45aeeb302f23dc5b4b669182fd985cba4f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/556696
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Now that we can calculate uniform offsets properly, we don't need manual
padding.
Change-Id: I1651d8e3c276df8e473e91be83acfc404ab781c8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/556600
Reviewed-by: James Godfrey-Kittle <jamesgk@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Previously, when Graphite generated SkSL, it assumed all uniforms were
tightly packed, since SkUniform doesn't have a built-in Offset field.
Now we recalculate the offsets by reusing logic from the UniformManager.
UniformManager has been split into two parts; UniformOffsetCalculator
contains just the basics needed for offset calculation without keeping
a storage buffer or tracking uniform expectations. Since the offset
calculation logic is the same, we should get the same layout for our
SkSL as we get when laying out uniforms to begin with.
Change-Id: I9c55b3255d2228dfdd45e106518bb6896bc78c88
Bug: skia:13405
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/556596
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Added code to remove code within switch statements due to break, return,
and continue statements. The logic is applied conservatively and only
among the statements of an individual switch-case statement without
affecting other cases.
Bug: skia:13484
Change-Id: Id5b936ca91e562a5180a31a039a85de9e093961d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/556376
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
If the maximum dimension of a glyph is zero in the drawing of last
resort, then skip this SubRun.
Bug: oss-fuzz:48695
Bug: oss-fuzz:48690
Change-Id: Icdca979c4152494f7028a482e33224664d97f4ae
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/556597
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Originally, I had to convince myself that these three calls can never
legitimately produce nullptr - that's basically covered by the calls
to blender_requires_shader that would prevent these code paths from
happening. (The source FP is always non-null. The dst FP is nullptr
for two of these, but in both cases we can't reach the call if the
blender is actually kDst).
With the recent change to GrBlendFragmentProcessor, the reasoning is
much simpler: no blender should ever return nullptr on success,
regardless of input.
Bug: skia:13459
Change-Id: I3e097f96f83e45a9bac283b2aec579f012ffb4c1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/551891
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Previously, the code for converting an SkSLType to a string only
existed in Ganesh, in GrGLSL.cpp/.h. This has now been moved to
SkSLTypeShared.cpp, and the Ganesh file was removed entirely.
Now that a cpp exists, I also moved some rarely-used utility function
bodies out of the header.
Change-Id: Id37ac54dabfe8b1264a2662a00c9780a1ecae2ba
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/556602
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Change-Id: Ie82c8a280cbc3997d0b65327535f0eaf0694bdfc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/556601
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
The FP factory would apply optimizations based on the mode, and return
one of the passed-in FPs. We use 'nullptr' as the 'src' FP when
constructing the blender's FP in make_effect_fp. This means that we get
back 'nullptr' from a src-mode blender. Later, we interpret that as
src-over (the default for an unset blender). Oops.
The new test variant would previously fail, before the fix to the FP.
The tweak to the FP technically eliminates an optimization, but it's one
that only applies to blending happening in the shader (eg, compose
shader, or runtime effects using a blender), and only when the blender
is one of the trivial modes. The resulting shader will still optimize
down, it just involves a bit of extra work before that happens. This
shouldn't have any long-term performance impact, particularly on
important scenarios.
Change-Id: Id5c6a6ca8a263b35c2dca3c41171748cffd41adb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/556599
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Pass an optional label parameter to GrBackendTexture and pass
it to MakeWrapped of GrGLTexture because almost all textures
that are coming clients are things where the client owns the
gl texture and passes it into Skia as a wrapped texture via a
GrBackendTexture.
Bug: chromium:1164111
Change-Id: I4bfddda956c72b53d0070595ef3268ee1a2b747f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/555597
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
These querries aren't actually used in this CL but will be used in the
follow up CL that adds newer intel bots.
Bug: skia:13401
Change-Id: I67b8e07fc66d0515e41e9a66616964235ace6568
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/556598
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This reverts commit 5117907413.
Reason for revert: blocking G3 roll and red bots
Original change's description:
> Add ToolUtils helper for generating GM UI sliders for variable fonts
>
> Use this new tool in the COLRv1 GM test for creating sliders in the GM
> UI if the test font provides variable axes. Update GM
> "fontscalerdistortable" as well.
>
> Preparation for testing variable COLRv1 fonts while developing
> this feature in FreeType.
>
> Bug: chromium:1311241
> Change-Id: I55419d6dc058f420a567d8a50cca5d719206daf4
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/555476
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Reviewed-by: Florin Malita <fmalita@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Commit-Queue: Dominik Röttsches <drott@chromium.org>
Bug: chromium:1311241
Change-Id: Icdd27da3b5c074964ca07fc6eee3e59aa90234b4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/556656
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Robert Phillips <robertphillips@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Use this new tool in the COLRv1 GM test for creating sliders in the GM
UI if the test font provides variable axes. Update GM
"fontscalerdistortable" as well.
Preparation for testing variable COLRv1 fonts while developing
this feature in FreeType.
Bug: chromium:1311241
Change-Id: I55419d6dc058f420a567d8a50cca5d719206daf4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/555476
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Commit-Queue: Dominik Röttsches <drott@chromium.org>
This checks the padding of a matrix followed by a scalar/vector, and the
padding of a scalar/vector followed by a matrix. The checks support
all mixes of 16- and 32-bit sized elements.
After some investigation, this CL also removes some TODOs in
`get_ubo_aligned_offset`. Our uniform system does not support structs,
which is a large source of disparity between layouts. With structs
removed from the equation, the only difference between layouts seems to
be related to std140 array padding. (std430 and Metal seem to be
entirely the same.)
Change-Id: I76c48ae1e597b98aad8a8f8495ab4a8ad262845b
Bug: skia:13478
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/556356
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>