Commit Graph

61432 Commits

Author SHA1 Message Date
Brian Osman
35af4736c8 Add API to validate an SkRuntimeEffect against SkCapabilities
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>
2022-07-11 15:27:09 +00:00
Robert Phillips
648883e065 Return SkPathEffect::onFilter failure if filter processing is killed
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>
2022-07-11 15:19:58 +00:00
Herb Derby
055576f1a8 Rename SkStrikeForGPU* to StrikeForGPU
Change-Id: I95066b1cdaee67af80521a0ca5ccfd0d5a09f3f0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557377
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-07-11 15:11:08 +00:00
Jim Van Verth
8484f0da8a [graphite] Add SDF text vertex support
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>
2022-07-11 15:05:35 +00:00
Herb Derby
46175a950f Move SkStrikeForGPU to sktext::gpu namespace
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>
2022-07-11 15:01:06 +00:00
Jim Van Verth
1ba7d429ab [graphite] Add vertex support for transformed text
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>
2022-07-11 14:55:07 +00:00
Jim Van Verth
25e6665b67 [graphite] Remove use of color attribute for text.
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>
2022-07-11 14:24:21 +00:00
Hans Wennborg
e2ba2f5b20 Fix -Warray-parameter warnings
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>
2022-07-11 14:15:08 +00:00
skia-autoroll
ebc51e1022 Roll ANGLE from bf52137bc90b to adcc645392e2 (1 revision)
bf52137bc9..adcc645392

2022-07-08 angle-autoroll@skia-public.iam.gserviceaccount.com Roll VK-GL-CTS from 867b77cee987 to ef9a6635208b (14 revisions)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/angle-skia-autoroll
Please CC scroggo@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in ANGLE: https://bugs.chromium.org/p/angleproject/issues/entry
To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Tbr: scroggo@google.com
Change-Id: I70c4f86885c4420290c7c6e1c8ebe40cb06f2080
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557296
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-07-11 05:51:56 +00:00
skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com
614301033f Update SKP version
Automatic commit by the RecreateSKPs bot.

Change-Id: I48b1a86f72b1ca1509d6c58085bca09caa736acb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557256
Commit-Queue: skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Bot-Commit: skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2022-07-10 07:21:54 +00:00
skia-autoroll
84bffff74f Roll vulkan-deps from 237d9597ccbd to 2cd215e4b5c5 (2 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/237d9597ccbd..2cd215e4b5c5

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-skia-autoroll
Please CC robertphillips@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in skia: https://bugs.chromium.org/p/skia/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn;skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE
Bug: None
Tbr: robertphillips@google.com
Change-Id: I184c842df8e0d6735863d66bfd9f56e5e2764927
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557196
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-07-08 23:28:52 +00:00
Herb Derby
800633b991 Extract strike reference mechanism for GlyphVector
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>
2022-07-08 22:05:54 +00:00
John Stiles
bd472a01ed Move runtime-effect dictionary into Graphite ResourceProvider.
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>
2022-07-08 20:29:38 +00:00
skia-autoroll
655de12b82 Roll vulkan-deps from 27ae12b5de8b to 237d9597ccbd (1 revision)
https://chromium.googlesource.com/vulkan-deps.git/+log/27ae12b5de8b..237d9597ccbd

Also rolling transitive DEPS:
  https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools from bc5c8760af83 to 69e1deabc1cd

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-skia-autoroll
Please CC robertphillips@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in skia: https://bugs.chromium.org/p/skia/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn;skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE
Bug: None
Tbr: robertphillips@google.com
Change-Id: Icf4133e314d96b426acf983742e918ef4a0c7025
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557077
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-07-08 18:36:33 +00:00
Herb Derby
56391549a2 Rename TestingPeer to GlyphVectorTestingPeer
Change-Id: Ie3378350f096e6e8baf96a093df70c7a76683072
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/557057
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2022-07-08 17:46:09 +00:00
Greg Daniel
6c8fd3f97d Add Intex IrisXe jobs for Windows.
Bug: skia:13401
Change-Id: Iacf7a5120bedad821e1818fd4c9a5fc9eff83425
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/556026
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2022-07-08 17:02:27 +00:00
skia-autoroll
9472cf4d64 Roll Dawn from be88e62c0f86 to e1d0aa9f9296 (2 revisions)
https://dawn.googlesource.com/dawn.git/+log/be88e62c0f86..e1d0aa9f9296

2022-07-08 shrekshao@google.com Inline memory transfer service offset bound update
2022-07-08 bclayton@google.com tools/cts: Fix go unit tests

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dawn-skia-autoroll
Please CC dsinclair@google.com,robertphillips@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dawn: https://bugs.chromium.org/p/dawn/issues/entry
To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn
Bug: None
Tbr: dsinclair@google.com,robertphillips@google.com
Change-Id: I83c6b68ca9448095488e47280773fb8aea8f0df8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/556284
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-07-08 17:01:57 +00:00
skia-autoroll
a9a29beef4 Roll vulkan-deps from 7bffe012b821 to 27ae12b5de8b (1 revision)
https://chromium.googlesource.com/vulkan-deps.git/+log/7bffe012b821..27ae12b5de8b

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-skia-autoroll
Please CC robertphillips@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in skia: https://bugs.chromium.org/p/skia/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn;skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE
Bug: None
Tbr: robertphillips@google.com
Change-Id: I65b11fe98cd3a2e7531e9a3c3338dacf0dd900cf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/556283
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-07-08 16:45:30 +00:00
Herb Derby
600a1be578 Make GlyphVector::flatten const
Change-Id: I4039f209c1a4185443fdd7319d9b3e712afbf29f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/556609
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-07-08 16:01:33 +00:00
Brian Osman
5ab7fe15e0 Allow division by zero in fill_triangle_3's perspective divide
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>
2022-07-08 15:52:41 +00:00
skia-autoroll
475c3e049c Roll ANGLE from 94bbb40a42cd to bf52137bc90b (2 revisions)
94bbb40a42..bf52137bc9

2022-07-08 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 1d6a1036bdb3 to 16e026a959f1 (1 revision)
2022-07-08 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 84d7af71045d to 14abb4e33fdf (505 revisions)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/angle-skia-autoroll
Please CC robertphillips@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in ANGLE: https://bugs.chromium.org/p/angleproject/issues/entry
To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Tbr: robertphillips@google.com
Change-Id: I69eaf2ec68b5d63da48d1df8accc63ca65c18a23
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/556281
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-07-08 15:50:16 +00:00
Brian Osman
de9e0aba9c Enable divide-by-zero check in ASAN builds
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>
2022-07-08 15:39:55 +00:00
Brian Osman
c7fe12e996 Avoid divide by zero in SurfaceContextWritePixelsMipped test
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>
2022-07-08 15:35:19 +00:00
Dominik Röttsches
f27608b656 Reland (2): 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, 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>
2022-07-08 15:30:26 +00:00
skia-autoroll
f3207f577b Roll Dawn from 342931ae08a2 to be88e62c0f86 (3 revisions)
https://dawn.googlesource.com/dawn.git/+log/342931ae08a2..be88e62c0f86

2022-07-08 bclayton@google.com tools/cts: Treat 'Skip' results as 'Pass'
2022-07-08 bclayton@google.com tint: Fix x86 build
2022-07-08 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 929a3752077e to 94bbb40a42cd (5 revisions)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dawn-skia-autoroll
Please CC dsinclair@google.com,robertphillips@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dawn: https://bugs.chromium.org/p/dawn/issues/entry
To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn
Bug: None
Tbr: dsinclair@google.com,robertphillips@google.com
Change-Id: Ia7dd5400cae11c99f8ed0a472ac2149ea0df6296
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/556282
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-07-08 14:39:01 +00:00
Aditya Kushwah
a3e29d2444 Pass optional label param to MakeWrapped.
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>
2022-07-08 14:23:34 +00:00
John Stiles
ca7657b093 Remove RuntimeShader built-in snippet ID.
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>
2022-07-08 14:18:19 +00:00
Robert Phillips
3b5c2c6ffd Revert "Reland: Add ToolUtils helper for generating GM UI sliders for variable fonts"
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>
2022-07-08 14:15:35 +00:00
John Stiles
71710eb1a5 Use findOrCreateRuntimeEffectSnippet to look up RTE snippet data.
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>
2022-07-08 14:12:59 +00:00
John Stiles
ddca6321cf Use SkSLTypeString when building the Graphite uniform list in SkSL.
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>
2022-07-08 14:12:59 +00:00
Dominik Röttsches
663ec474bb 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>
2022-07-08 14:00:49 +00:00
Robert Phillips
6d34ac6778 Limit range of startAngle in SkPath::arcTo
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>
2022-07-08 13:54:49 +00:00
skia-autoroll
fb1fe33fc2 Roll vulkan-deps from 12c42239e713 to 7bffe012b821 (2 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/12c42239e713..7bffe012b821

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-skia-autoroll
Please CC robertphillips@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in skia: https://bugs.chromium.org/p/skia/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn;skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE
Bug: None
Tbr: robertphillips@google.com
Change-Id: I3f86af2082cfdc18218b97f6c5ed271b4403b0a7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/556280
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-07-08 10:45:25 +00:00
skia-autoroll
1716e84b8f Roll ANGLE from cd1b22eecd83 to 94bbb40a42cd (7 revisions)
cd1b22eecd..94bbb40a42

2022-07-08 lexa.knyazev@gmail.com GL: Enable pack skip emulation on all Apple drivers
2022-07-07 cclao@google.com Vulkan: Remove VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT
2022-07-07 lexa.knyazev@gmail.com D3D9: Implement float sources for Image9::copyFromRTInternal
2022-07-07 lexa.knyazev@gmail.com Clamp viewport dimensions on store
2022-07-07 mark@lunarg.com Extend labelObject functionality
2022-07-07 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 7987bda077c8 to 1d6a1036bdb3 (2 revisions)
2022-07-07 lexa.knyazev@gmail.com Expose EXT_compressed_ETC1_RGB8_sub_texture on Metal and GL

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/angle-skia-autoroll
Please CC robertphillips@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in ANGLE: https://bugs.chromium.org/p/angleproject/issues/entry
To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Tbr: robertphillips@google.com
Change-Id: I05945917675f4f2f3f9759e2d47262f7c92d6fd5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/556559
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-07-08 05:58:22 +00:00
skia-autoroll
5ab5400af0 Roll SwiftShader from 1d6a1036bdb3 to 16e026a959f1 (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/1d6a1036bdb3..16e026a959f1

2022-07-07 swiftshader.regress@gmail.com Regres: Update test lists @ 1d6a1036

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/swiftshader-skia-autoroll
Please CC robertphillips@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in SwiftShader: https://bugs.chromium.org/p/swiftshader/issues/entry
To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: robertphillips@google.com
Change-Id: Ib97bc8645d7787aa9ac586bb9d5ddc4cbd7e82a1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/556561
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-07-08 04:51:33 +00:00
skia-autoroll
4582982449 Roll Dawn from e427a9ba5ec2 to 342931ae08a2 (7 revisions)
https://dawn.googlesource.com/dawn.git/+log/e427a9ba5ec2..342931ae08a2

2022-07-07 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from afcca86c6da3 to 929a3752077e (4 revisions)
2022-07-07 bclayton@google.com tint/resolver: Evaluate const-expr swizzles
2022-07-07 bclayton@google.com tint/resolver: Optimize constant evaluation methods
2022-07-07 bclayton@google.com tint/sem: Remove TypeMappings for derived expressions
2022-07-07 bclayton@google.com tint/resolver: Fix calling of builtins at module-scope
2022-07-07 bclayton@google.com tint/resolver: Fix null-deref
2022-07-07 bclayton@google.com gn: Add empty ubsan ignore list

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dawn-skia-autoroll
Please CC dsinclair@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dawn: https://bugs.chromium.org/p/dawn/issues/entry
To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn
Bug: None
Tbr: dsinclair@google.com
Change-Id: Idc013153ab0ceb2ef1cec8d5f105cf5e29a1f847
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/556560
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-07-08 04:47:54 +00:00
John Stiles
f928ea433c Remove padding uniforms from Graphite snippets.
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>
2022-07-07 22:48:12 +00:00
John Stiles
b7152b1931 Fix Graphite SkSL uniform offset calculation.
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>
2022-07-07 22:48:12 +00:00
skia-autoroll
a4d684fc3e Roll vulkan-deps from c119749eff1f to 12c42239e713 (6 revisions)
https://chromium.googlesource.com/vulkan-deps.git/+log/c119749eff1f..12c42239e713

Also rolling transitive DEPS:
  https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools from 05de65037136 to bc5c8760af83
  https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Headers from 2c823b7f2759 to 9f73b931f402
  https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Tools from 1987cb233183 to ffc961dbd741

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/vulkan-deps-skia-autoroll
Please CC robertphillips@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in skia: https://bugs.chromium.org/p/skia/issues/entry

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn;skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE
Bug: None
Tbr: robertphillips@google.com
Change-Id: Ibe676d4dbeb4ac09091a48919bff76c50259d4c0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/556558
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-07-07 22:01:25 +00:00
Arman Uguray
9c242fff99 [sksl] Eliminate unreachable blocks inside switch cases
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>
2022-07-07 21:23:54 +00:00
Herb Derby
aec63060e6 Avoid divide-by-zero
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>
2022-07-07 20:56:59 +00:00
Brian Osman
ba0e0dafab Fail paint conversion if a blender fails to produce an FP
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>
2022-07-07 20:39:22 +00:00
John Stiles
33ea12e1cb Add SkSLTypeShared cpp file.
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>
2022-07-07 20:14:06 +00:00
Brian Osman
068fc2cfc1 Add vtune jit support for linux
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>
2022-07-07 19:48:25 +00:00
Brian Osman
4008acdc7c Fix a subtle bug with blend-mode blenders used from runtime effects
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>
2022-07-07 19:46:38 +00:00
Aditya Kushwah
cb44bf6246 Label external texture.
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>
2022-07-07 19:20:59 +00:00
Greg Daniel
bde135f0bc Add support for querying intel device types in GrVkCaps.
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>
2022-07-07 19:12:28 +00:00
Robert Phillips
20402a69d0 Revert "Add ToolUtils helper for generating GM UI sliders for variable fonts"
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>
2022-07-07 19:02:25 +00:00
Dominik Röttsches
5117907413 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>
2022-07-07 18:31:45 +00:00
John Stiles
2d6e13210d Add UniformManager tests for matrix/vector padding.
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>
2022-07-07 17:14:11 +00:00