Skia relies on the existence of FT_COLR_COMPOSITE_PLUS, FT_ClipBox, and
FT_Get_Color_Glyph_ClipBox for COLRv1 support. However, these were not
available in the released FreeType 2.11.0 headers since the
specification later changed to require these. In addition, since 2.11.0,
FT_PaintRadialGradient changed the types of two of its members and the
Skia code must depend on this change.
Unrelated, the FT_STATIC_CAST macro was added after these changes. So
undefine TT_SUPPORT_COLRV1 if FreeType is less than 2.11.1 unless
FT_STATIC_CAST is defined.
Change-Id: Id827de5a6500fad900f9d9f2a11b1c69cfbd6aa8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/475646
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
This interface will be shared between the GrTextBlob, and Slug.
Change-Id: Idac5fb1ba64a60458098fc02bd7e473c31525bb2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/475542
Commit-Queue: Herb Derby <herb@google.com>
Auto-Submit: Herb Derby <herb@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This is an automated CL created by the recipe roller. This CL rolls
recipe changes from upstream projects (recipe_engine) into this repository.
The build that created this CL was
https://ci.chromium.org/b/8829739475866125617
recipe_engine:
206cd301ad
206cd30 (gbeaty@chromium.org)
Remove the log from write_raw.
More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug.
R=borenet@google.com
Recipe-Tryjob-Bypass-Reason: Autoroller
Bugdroid-Send-Email: False
Change-Id: I2105dc2732056110c9ae22f0f0b371f05272b383
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/475719
Commit-Queue: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Recipe Roller <recipe-mega-autoroller@chops-service-accounts.iam.gserviceaccount.com>
The "user" reference value was being used rather than the resovled
value.
Also set the cap that two sided stenciling doesn't support separate
mask and ref values (like D3D).
Enable the recently added unit test crbug_1271431 which was failing
because of this bug.
Bug: skia:12675
Change-Id: I49d2443d8f7855706f98f59553bb7ca86f336f23
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/475640
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Updated go.mod/go.sum with:
$ go get go.skia.org/infra@4b39063800
$ go mod download
$ make -C infra/bots train
Bug: skia:12653
Change-Id: Iad62ea481724ee92d96b6d6d805a3f7a14c85917
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/475643
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
There is no reason to calculate the int version of this value
just to turn around and convert it back to a SkScalar.
Change-Id: I9e3924de125cef94edaa14ebfcd1d43cb0c3ce72
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/475642
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Herb Derby <herb@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Change-Id: I16c9bf3c27eb120e89a092e1fe35317ceb419847
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/475641
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: Herb Derby <herb@google.com>
This reverts commit ad9d774c1f.
Reason for revert: Task Test-Debian10-Clang-NUC7i5BNK-GPU-IntelIris640-x86_64-Release-All-DDL3_TSAN has been failing since this CL landed.
Original change's description:
> Add public API support for SkImageFilters::RuntimeShader
>
> This new image filter constructor enables SkRuntimeEffects to be
> used as shaders within the ImageFilter DAG. The shader is created
> lazily using the SkRuntimeShaderBuilder enabling the resulting
> shader to consume the previous stage of the ImageFilter graph.
>
> Change-Id: I5d6917e34a8e5fdd053399f15a1e2cc7409e686f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/470459
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Derek Sollenberger <djsollen@google.com>
Change-Id: I0367a5c480df109c6116eb168792fe3c2fc58807
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/475644
Auto-Submit: Leandro Lovisolo <lovisolo@google.com>
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Leandro Lovisolo <lovisolo@google.com>
This adds a simple go program to test the installed go
toolchain, and a Make rule to codify the arguments to
our gazelle binary, built with extensions.
I could not figure out how to get the .json file to work
with the gazelle() Bazel rule, but this works ok for now.
Bug: skia:12541
Change-Id: I5067b15c7518951aeb69559d3871799d3b5745f4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/475716
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
This uses the gazelle extension from
https://skia-review.googlesource.com/c/buildbot/+/473357
Review Tips:
- Ignore any changes to .h or .cpp files. Those have been
pulled out into their own CLs.
- Start with bazel/macros.bzl.
- Read the CL with the generation code, if you haven't already.
- Look at third_party/file_map_for_bazel.json.
- See experimental/bazel_test for an idea of how a cc_binary
would be made.
- Spot check one or two of the BUILD.bazel files.
This CL generates the "atomic" rules for src/, include/ and
modules/skshaper, as a starting point.
`bazel build --config clang //include/...` works
`bazel build --config clang //src/...` starts compiling,
(which verifies that the BUILD.bazel files are all valid),
but runs into errors because not all third_party deps have
been resolved, and there are some files missing from the
toolchain still (e.g. EGL headers).
Change-Id: Ib7e0fb0efdb9f08655f06cbc56e9bb4cf416294b
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/474240
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
Change-Id: I581f78b829a810d93a065cbbda9a1f87c41f5c45
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/475541
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
This is a reland of 9372ef0228
Original change's description:
> Restrict where 'binding' and 'set' can appear
>
> In SPIRV, these are an error when applied to struct members. Some of our
> tests were triggering that because we had free-floating uniforms
> decorated this way (and we coalesce those into members of an interface
> block).
>
> Now, we only allow those layout qualifiers on variable types that will
> remain top-level constructs in the back-end.
>
> Bug: skia:12670
> Change-Id: I73e69cecf6237a1c1180ad38d9b5d52ea80316fb
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/474218
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Bug: skia:12670
Change-Id: I01c0323bba7ce0bddea5f9fb907e2b60e6b812d2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/475156
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Things have evolved since these were last updated. In particular, we no
longer emit binding and set decorations for each individual uniform.
Backends that rely on that (SPIRV, Metal), generate SkSL that has all
the uniforms grouped in a buffer. GLSL emits the uniforms with no layout
qualifiers. SPIRV supported this already (and automatically applied the
default binding/set to the implicitly created uniform buffer). Metal
*almost* supported this - it handled the uniform buffer correctly, but
didn't apply the default binding to any un-decorated samplers.
Bug: skia:12670
Change-Id: I7b193b89f86441344cf7ad5b7ed5e07451a1cc6d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/475157
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This new image filter constructor enables SkRuntimeEffects to be
used as shaders within the ImageFilter DAG. The shader is created
lazily using the SkRuntimeShaderBuilder enabling the resulting
shader to consume the previous stage of the ImageFilter graph.
Change-Id: I5d6917e34a8e5fdd053399f15a1e2cc7409e686f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/470459
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
Follow the ordinary pattern on SkCanvas for handling GrSlugs. This
should allow more flexibility in the future.
Change-Id: Ic498b5d081a1c7e44c2864439423910c452408b7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/474899
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Each includes the other, but the former doesn't appear to need
the latter.
Change-Id: Ie2447717edf6188825418ef129dc28a28508fb43
Bug: skia:12584
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/475097
Reviewed-by: Ben Wagner <bungeman@google.com>
Bug: skia:12466
Change-Id: Ie7414d7417e88249dd9f6421f8069be898adaece
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/474217
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Moves Attribute into its own header. I did not move AttributeSet/Iter
out of GraphicsPipelineDesc because RenderStep should be able to just
rely on SkSpan<Attribute>. Since they are fixed definitions, there
shouldn't be a need to support skipping over uninitialized attrs. Once
GraphicsPipelineDesc just points to a RenderStep, AttributeSet/Iter can
be deleted.
Bug: skia:12466
Change-Id: I3b01b6283669fc02dc9cd0521bb236a9d0daa5eb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/474136
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
There's no need for these fields to be private, and it removes the
need for friend classes -- the Caps classes can now set them directly.
Change-Id: I9b03d2ba06b792141036770f19804f100c05eeab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/475258
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Change-Id: I94ded218e822fe50687e1efff7d46bcc4c1f1293
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/471780
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
This reverts commit 9372ef0228.
Reason for revert: Unhappy bots
Original change's description:
> Restrict where 'binding' and 'set' can appear
>
> In SPIRV, these are an error when applied to struct members. Some of our
> tests were triggering that because we had free-floating uniforms
> decorated this way (and we coalesce those into members of an interface
> block).
>
> Now, we only allow those layout qualifiers on variable types that will
> remain top-level constructs in the back-end.
>
> Bug: skia:12670
> Change-Id: I73e69cecf6237a1c1180ad38d9b5d52ea80316fb
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/474218
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Bug: skia:12670
Change-Id: Ie518192d9a52fc896e615ec08ce0674ad683ec61
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/475099
Auto-Submit: Brian Osman <brianosman@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bug: skia:12662
Change-Id: Ic2924257fce3ea9a2df5e49d0ab26ad085693d30
Cq-Include-Trybots: luci.skia.skia.primary:Canary-Flutter
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/473676
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Introduce the GrSlug that encapsulates an SkTextBlob along with
the origin, and paint to create a GrSlug. You can draw the slug
using the canvas, and it will obey the canvas's clip and mapping.
See the full working prototype at:
https://skia-review.googlesource.com/c/skia/+/471157/17
Change-Id: I5731dce3dea316ad144baead154a68c8e4c5db9a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/474040
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
In SPIRV, these are an error when applied to struct members. Some of our
tests were triggering that because we had free-floating uniforms
decorated this way (and we coalesce those into members of an interface
block).
Now, we only allow those layout qualifiers on variable types that will
remain top-level constructs in the back-end.
Bug: skia:12670
Change-Id: I73e69cecf6237a1c1180ad38d9b5d52ea80316fb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/474218
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Having all includes to skia source will make generating
BAZEL rules easier.
Change-Id: I318dfc88e736a62da151098bebbee8d7b357d963
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/474736
Reviewed-by: Ben Wagner <bungeman@google.com>
Not only is this a best practice, it will make generating
BAZEL.build files easier.
Change-Id: Ib77c7dac6167235ec1b73a93bfd3a9c44b42ca83
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/474756
Reviewed-by: Ben Wagner <bungeman@google.com>
All of the draw variants except drawIndexed support all base arguments
as part of the draw call that is recorded. Updated drawIndexed to use
the "instance" version and draw 1 instance if the baseVertex is not 0.
Previously, if we bound the buffer at a non-zero offset, but then
passed in 0 for the base vertex/instance relative to that, it would
reset the vertex offset to 0. This also cuts down on the number of
commands recorded since draws will only correspond to one command.
Bug: skia:12466
Change-Id: I3eb95b02d33f2d1e9b36991a8b824012383bc192
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/474058
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Bug: skia:b/197500792
Change-Id: I0005469352cd44cf4c66aea11de98a0247afd747
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/474397
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
This change will make unifying code easier in future CLs.
Change-Id: I981b99ba4da6762702adfcb26165c1d3065339f7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/474896
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Change-Id: I750bf3103504e3ed12c93e3071950785128f7db5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/474838
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Bug: skia:12524
Change-Id: I2fb523495cfa72591a14b4ef03d32e3aad06fcf2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/474396
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Bug: skia:12524
Change-Id: Iac60a99331fefe9e997b61c4b2b329e39b95ae6e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/470197
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Bug: skia:12524
Change-Id: I2664c8ea707a40724bcf916e907fe28d1fa276d6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/474357
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>