Commit Graph

59217 Commits

Author SHA1 Message Date
Herb Derby
1c0f1abd53 harden GrGlyphVector::MakeFromBuffer
Harden MakeFromBuffer with respect to the array length value.
* Check that the array count is not too large.

Change-Id: I5b398be1690fafce5be5b90ba8aa7af0f12be317
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/507637
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-02-11 16:58:59 +00:00
Jim Van Verth
9af3a919ce [graphite] Hook up Surface::writePixels
Bug: skia:12845
Change-Id: I8013b0068ab758e9a5e580344c62e4680f4fa48e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506176
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2022-02-11 16:37:41 +00:00
Brian Osman
40d7426345 Remove isOpaque from SkRuntimeEffect::makeShader signature
Bug: skia:12643
Change-Id: Id5eecb3445082e747def8c87f99a16552857af3f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506462
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-02-11 16:05:01 +00:00
Greg Daniel
7caeb1bdb1 [graphite] Add calcuating of graphtie resource key for Textures in Caps
Bug: skia:12754
Change-Id: Ib4f1a9ac4ef16805cf8ca4e4c0eea0b3922ca28a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506465
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-02-11 16:03:46 +00:00
skia-autoroll
fac61d55f3 Roll ANGLE from d5df233189ca to 0a320d16fe80 (2 revisions)
d5df233189..0a320d16fe

2022-02-11 lubosz.sarnecki@collabora.com GetImageTest: Enable on Vulkan SwiftShader.
2022-02-11 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from bf99b2cc0f6b to c0b2804cbd93 (526 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 herb@google.com,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: herb@google.com,robertphillips@google.com
Change-Id: I1082a4dbdbe3c8d53b1d15e1a847b87b08731684
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/507656
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-02-11 15:20:48 +00:00
John Stiles
9c111af64b Add more fuzzer-discovered programs to error tests.
These all stemmed from the same root cause, but are interesting and
distinct enough to include in our error tests.

Bug: oss-fuzz:44555, oss-fuzz:44557, oss-fuzz:44559, oss-fuzz:44561, oss-fuzz:44565
Change-Id: I22c1798809754b4b38c77ffbe369a97c64a2f60e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/507636
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-02-11 14:42:43 +00:00
John Stiles
683ae40560 Fix for fuzzer-discovered error with deeply-nested expressions.
The fuzzer constructs a long, valid nonsense expression
(x+x+x-x+x-x, etc.) which exceeds parse depth. At that point, the token
stream points to a `+` token. The parser attempts to consume a new
statement but stops in `unaryExpression`; this fails again, due to the
max parse-depth, but doesn't consume a token. The parser continues
trying to parse the statement, but stopping in `unaryExpression`, making
no forward progress in an infinite loop.

I've made a couple of changes as a result.
- Exceeding the max parse depth now sets `fEncounteredFatalError`.
- Encountering a fatal error causes block() to immediately halt. This
  actually undoes a few of the arbitrary changes from
  http://review.skia.org/506463 but not in a bad way.
- `unaryExpression()` now consumes a token before checking parse-depth.
- `structDeclaration()` had a similar issue where it could potentially
  fail without consuming any tokens; this is fixed as well.
- Some unnecessarily-nested logic in ternaryExpression() was flattened
  while I tried to ensure that it always consumes a token.

Change-Id: I52c2161965ffbcef1185761ca6897ec1cba5df89
Bug: oss-fuzz:44551
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/507436
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2022-02-11 14:25:34 +00:00
Herb Derby
a9ac0ce55d add flatten and MakeFromBuffer for GrGlyphVector
Serialize all the glyphID information for the different
sub runs.

Bug: chromium:1278340

Change-Id: I04387ffadcf5cb20fbaca17a02d7ca1faf883806
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/507318
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-02-11 13:57:15 +00:00
Kevin Lubick
a59af6e4f2 Revert "Build CanvasKit using GN/Ninja"
This reverts commit ecac712bec.

Reason for revert: possibly breaking flutter, definitely breaking docker wasm builds

Original change's description:
> Build CanvasKit using GN/Ninja
>
> Build with
>
> ./bin/gn gen out/wasm_debug '--args=target_cpu="wasm"'
>
> or
>
> ./bin/gn gen out/wasm_release '--args=target_cpu="wasm" is_debug=false'
>
> Change-Id: Ib74586bf8397d57064a3899eaa6da76f9bce9049
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502036
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Reviewed-by: Ben Wagner <bungeman@google.com>

Change-Id: I04dbb3b1cff7511064f603d7dc7c8a4168bf0d56
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/507616
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2022-02-11 13:35:19 +00:00
Harry Terkelsen
ecac712bec Build CanvasKit using GN/Ninja
Build with

./bin/gn gen out/wasm_debug '--args=target_cpu="wasm"'

or

./bin/gn gen out/wasm_release '--args=target_cpu="wasm" is_debug=false'

Change-Id: Ib74586bf8397d57064a3899eaa6da76f9bce9049
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502036
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2022-02-11 13:05:44 +00:00
skia-autoroll
714ae3262d Roll ANGLE from 670a6e476ea4 to d5df233189ca (10 revisions)
670a6e476e..d5df233189

2022-02-11 cclao@google.com Vulkan: Disable EGLContextSharingTestNoSyncTextureUploads on Pixel6
2022-02-10 syoussefi@chromium.org Vulkan: Render the overlay in the graphics pipeline
2022-02-10 angle-autoroll@skia-public.iam.gserviceaccount.com Roll VK-GL-CTS from b594e2aabae9 to 071bfca11aa9 (1 revision)
2022-02-10 cclao@google.com Vulkan: Use Vulkan API directly for BufferPool's buffer allocation
2022-02-10 m.maiya@samsung.com Update GL_MAX_CLIP_DISTANCES_EXT validation
2022-02-10 steven@valvesoftware.com Vulkan: improve command buffer reset performance
2022-02-10 sweeper1203@gmail.com Support to open d3d12 shared handles
2022-02-10 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 0915ab4bddf7 to cbd31d271e4c (3 revisions)
2022-02-10 ynovikov@chromium.org Revert "Don't build dEQP tests on MSVC temporarily"
2022-02-10 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 60719c9cd084 to bf99b2cc0f6b (543 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 herb@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: herb@google.com
Change-Id: Ic71fec76984ca5f7b4ea57fea5d57ba849cd961c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/507418
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-02-11 05:45:11 +00:00
skia-autoroll
f3ec7d63a0 Roll Chromium from 4c42b6a53bab to de0330e7e3fa (535 revisions)
4c42b6a53b..de0330e7e3

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

To file a bug in Chromium: https://bugs.chromium.org/p/chromium/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:Perf-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-CommandBuffer;skia/skia.primary:Test-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-CommandBuffer
Tbr: herb@google.com
Change-Id: I19606c27bddfc064548edcca0c77e7c8759a1e2a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/507416
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-02-11 05:22:15 +00:00
skia-autoroll
02bab9d2c7 Roll SwiftShader from cbd31d271e4c to 0863290dc7f6 (7 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/cbd31d271e4c..0863290dc7f6

2022-02-10 sugoi@google.com Add partial support of VK_EXT_extended_dynamic_state2
2022-02-10 sugoi@google.com Support VK_EXT_texel_buffer_alignment promoted features
2022-02-10 capn@google.com Fix shuffling of vectors with a different size mask
2022-02-10 sugoi@google.com VK_EXT_extended_dynamic_state support
2022-02-10 capn@google.com Remove unused sin/cos approximations
2022-02-10 capn@google.com Optimize SPIR-V sin and cos operations
2022-02-10 swiftshader.regress@gmail.com Regres: Update test lists @ cbd31d27

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 herb@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: herb@google.com
Change-Id: Idddfaa71ebd649bb937033cc9bd6bc6ed0e30efd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/507417
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-02-11 04:58:05 +00:00
skia-autoroll
f683ab643f Roll Dawn from 47f051984b88 to a52abab38ce9 (12 revisions)
https://dawn.googlesource.com/dawn.git/+log/47f051984b88..a52abab38ce9

2022-02-11 senorblanco@chromium.org Nuke SPIRV-Cross.
2022-02-10 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 0b3dfef4698f to 98facb28abc8 (3 revisions)
2022-02-10 senorblanco@chromium.org OpenGL: use Tint for GLSL generation.
2022-02-10 brandon1.jones@intel.com Remove accidental unused Transform Manager
2022-02-10 enga@chromium.org Remove old src/tests/BUILD.gn
2022-02-10 brandon1.jones@intel.com Integrate Multiplanar External Texture Transform
2022-02-10 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 670a6e476ea4 to 118ce6aae027 (4 revisions)
2022-02-10 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 8bbdda7e89dd to 0b3dfef4698f (1 revision)
2022-02-10 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from cbd31d271e4c to a7f412ebb116 (1 revision)
2022-02-10 vadimsh@google.com Generate shorter bucket names in luci-scheduler.cfg.
2022-02-10 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 597fc4cdbe07 to 8bbdda7e89dd (3 revisions)
2022-02-10 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 9cfd872447fd to 670a6e476ea4 (7 revisions)

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from 597fc4cdbe07 to 98facb28abc8

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 amaiorano@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: amaiorano@google.com
Change-Id: Ie964aacfb9b9ca245f337e25f53bd51521325ee3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/507419
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-02-11 04:58:01 +00:00
Michael Ludwig
d6d853d765 Integrate Wang's formula calculation into patch creation
Adds wangs_formula::quadratic_pow4, cubic_pow4, conic_pow2 overloads
that operate on float2 directly instead of having to load data from
SkPoints. This means that the fixed count tessellators now only load
their control points into float2s once (when creating a patch geometry)
and then evaluate Wang's formula on those points, vs. both patch
geometry and Wang's formula evaluation requiring reading from the
SkPoint[] data. Not sure how likely a compiler is to have automatically
reduced that work.

Change-Id: I18eeb3e81a7e4b38f3fdfe4cc652a468415857a3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/502058
Reviewed-by: Christopher Dalton <csmartdalton@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-02-11 01:51:04 +00:00
Florin Malita
82d65d0487 Revert "Migrate compat v4 classes to androidx"
This reverts commit dec95f24e1.

Reason for revert: broke viewer build

The original CL was landed to keep upstream Skia the source of
truth when the changes were proposed directly in G3 in cl/414839941.

Original change's description:
> Migrate compat v4 classes to androidx
>
> Change-Id: I9dd1d4cbaaf0dc5c4dc8a7bd9155ae6334ab24af
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/480396
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>

Change-Id: I660ba61a3a777e18154c52e8eda63937be4d7b4a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/507184
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2022-02-11 00:51:39 +00:00
Jim Van Verth
74ce095463 [graphite] Rename skgpu::Surface_Graphite to skgpu::Surface
This to match the naming convention for skgpu::Device and the future
skgpu::Image.

Change-Id: Ide0448633f14cfcba583a24eaaceb24da8a58e90
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/507317
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-02-10 21:50:41 +00:00
Herb Derby
7dcf3d0599 const uses of SkGlyph* -- const all the things!
Change-Id: I9c985a8c68efea0b24a51e87fa09569d927ae0c6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506897
Commit-Queue: Herb Derby <herb@google.com>
Auto-Submit: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-02-10 21:35:45 +00:00
Ethan Nicholas
e1e2a85820 Removed SkSL binary SystemType command
This command is redundant now that we have kBuiltin_Symbol.

Change-Id: Ia41d80b6601bd47e9ec9a14777adf7e1c71fb610
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/507316
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2022-02-10 21:13:41 +00:00
Herb Derby
dd6596250d extract GlyphVector into GrGlyphVector
Extricate GlyphVector to test serialization which will be added to
it in the future.

Change-Id: I2baa01d92394b3f9af6fe4c3e14341ed453d572f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506885
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-02-10 19:44:39 +00:00
Julia Lavrova
39728eb980 Revert "Adding a trace to nanobench for RP/VM comparison"
This reverts commit e855b1273f.

Reason for revert: breaking the tree

Original change's description:
> Adding a trace to nanobench for RP/VM comparison
>
> Run nanobench with --compare key and collect data for comparison:
> ./out/Release/nanobench --csv --config 8888 --skvm --compare --loops 100 --samples 1 --match $(ls skps | grep --invert-match svg ) 2>&1 | tee VM.data
> ./out/Release/nanobench --csv --config 8888 --forceRasterPipeline --compare --loops 100 --samples 1 --match $(ls skps | grep --invert-match svg ) 2>&1 | tee RP.data
> awk 'BEGIN {OFS=","; fileNum = 0} ($2 ~ /MB/) && fileNum == 0 {vmvmcycles[$3] = $6; vmvmscan[$3] = $8; vmvmpixels[$3] = $10; vmvminterp[$3] = $11;  vmrpcycle[$3] = $14; vmrpscan[$3] = $16; vmrppixels[$3] = $18} ($2 ~ /MB/) && fileNum == 1  {print $3, vmvmcycles[$3], vmvmscan[$3], vmvmpixels[$3], vmvminterp[$3], $6, $8, $10, $11, $14, $16, $18} ENDFILE {fileNum += 1}' VM.data RP.data > compare.csv
>
> You can see an example of comparison table here:
> https://docs.google.com/spreadsheets/d/1Q57oz6Jn8JPQkPzUbtO0fcZh2VhwPhxwsLaHnSb9uR0/edit#gid=406063636
>
> Change-Id: I8fa35e3fb087bce00ab19355a3bc021334aa7a80
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/501337
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Julia Lavrova <jlavrova@google.com>

Change-Id: I6799b90ffd8bc05c65d1185bfc07a06af05e2038
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/507182
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2022-02-10 19:34:36 +00:00
Herb Derby
b6dfd97c52 const SkDescriptor::flatten
Change-Id: I4a37da74f9fc351cf62e9c028c38ac1f3f8c963a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506883
Commit-Queue: Herb Derby <herb@google.com>
Auto-Submit: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-02-10 19:12:13 +00:00
Ben Wagner
db4a543e45 Implement SkRecordedDrawable::onApproximateBytesUsed
This allows recorded pictures finished as drawables to be used for glyph
drawing.

Change-Id: I717626eda2bf4e1659c8941c3217cb61c1a16cf4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506882
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2022-02-10 18:53:09 +00:00
Julia Lavrova
e855b1273f Adding a trace to nanobench for RP/VM comparison
Run nanobench with --compare key and collect data for comparison:
./out/Release/nanobench --csv --config 8888 --skvm --compare --loops 100 --samples 1 --match $(ls skps | grep --invert-match svg ) 2>&1 | tee VM.data
./out/Release/nanobench --csv --config 8888 --forceRasterPipeline --compare --loops 100 --samples 1 --match $(ls skps | grep --invert-match svg ) 2>&1 | tee RP.data
awk 'BEGIN {OFS=","; fileNum = 0} ($2 ~ /MB/) && fileNum == 0 {vmvmcycles[$3] = $6; vmvmscan[$3] = $8; vmvmpixels[$3] = $10; vmvminterp[$3] = $11;  vmrpcycle[$3] = $14; vmrpscan[$3] = $16; vmrppixels[$3] = $18} ($2 ~ /MB/) && fileNum == 1  {print $3, vmvmcycles[$3], vmvmscan[$3], vmvmpixels[$3], vmvminterp[$3], $6, $8, $10, $11, $14, $16, $18} ENDFILE {fileNum += 1}' VM.data RP.data > compare.csv

You can see an example of comparison table here:
https://docs.google.com/spreadsheets/d/1Q57oz6Jn8JPQkPzUbtO0fcZh2VhwPhxwsLaHnSb9uR0/edit#gid=406063636

Change-Id: I8fa35e3fb087bce00ab19355a3bc021334aa7a80
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/501337
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2022-02-10 18:24:56 +00:00
Brian Osman
a7a2324f14 Reland "Add kR8_unorm_SkColorType"
This is a reland of 3225c8cc46

Original change's description:
> Add kR8_unorm_SkColorType
>
> Change-Id: I97b5bc7f90715664f233ca7b7c41c0ecbfc29ac4
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505679
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

Change-Id: I73fa17625d57e0e58da1b70e2e59ba200383cfe7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506460
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-02-10 18:00:19 +00:00
Erik Rose
21cd6ff6a9 [infra] Make jobs for new Intel MacBook Pros
...based on conversation with jvanverth@ on 2022-02-04 in Skia GChat.
Change-Id: I463737e33e87f2052326f6231781a801ad5c320c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506877
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Erik Rose <erikrose@google.com>
2022-02-10 17:26:47 +00:00
Kevin Lubick
7b5c0de7ce [canvaskit] Improve error when non-matrix argument passed in
Follow-up to https://skia-review.googlesource.com/c/skia/+/506458

This will also make closure not rename the DOMmatrix arguments
(it wasn't happening, but it could have).

Change-Id: Id2e141ce777579d12c5c45a3bfe9661602fed3e6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506976
Reviewed-by: Brian Osman <brianosman@google.com>
2022-02-10 17:15:55 +00:00
Brian Osman
77326adc07 Remove isOpaque parameter from CanvasKit SkRuntimeEffect APIs
Bug: skia:12643
Change-Id: I285d42c908c75532b78c9b80da7b6145e1b47fe7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506458
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-02-10 17:15:13 +00:00
John Stiles
2332138185 Limit infinity support to GLSL 3.3 and above.
isinf() exists in GLSL 1.3 and above, but hardware without proper IEEE
support is allowed to always return false, so it's potentially
meaningless. In GLSL 3.3 and GLSL ES3+, isinf() is required to actually
identify infinite values. (GPUs are not required to _produce_ infinite
values via operations like `num / 0.0` until GLSL 4.1.)

Change-Id: I6d8cd70f47f653402d9eb2a0aed0773e54cfa61b
Bug: skia:12716
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506878
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Christopher Dalton <csmartdalton@google.com>
Commit-Queue: Christopher Dalton <csmartdalton@google.com>
2022-02-10 17:09:41 +00:00
John Stiles
1df7393e44 Enable warning -Wformat-nonliteral.
Change-Id: I5147bea5b113d41e1d47fabca51dfbbc961fa70f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506836
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-02-10 16:37:05 +00:00
John Stiles
2122f40c4b Update REPORTER_ASSERT/ERRORF to check format strings.
Previously, REPORTER_ASSERT/ERRORF relied on a helper function named
`reporter_string` which papered over zero-argument and one-argument
messages (where one-argument messages are assumed to ignore printf
formatting rules entirely, and just forward the message as-is).

Replacing this helper with a direct call to `SkStringPrintf` allows
the compiler to check format arguments for correctness, but sacrifices
the one-argument special case. In practice the one-argument special
case was very rarely used, so it's not a significant sacrifice,
and this did uncover several real errors in assertion format strings
(including some cases where the wrong number of arguments was passed).

Change-Id: I4378c43b16fd8fdbf4c78d849a9f2f0a254f7abc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506617
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2022-02-10 16:37:05 +00:00
Herb Derby
c5d3326d76 check length for serialized descriptors
Check that the required number of bytes exist for the length
given in the header.

Bug: oss-fuzz:44541

Change-Id: I6f0896fa50a032f97d3981b5f17cf99ef23144b8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506779
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-02-10 15:06:33 +00:00
John Stiles
6dda78ac7b Add SkSL error tests for runtime_errors directory.
This enables the SkSL error testing logic for runtime effects. The core
logic is identical, only the ProgramKind differs.

(Error creation scripts: http://go/paste/6413797460803584 with some
light post-processing)

Change-Id: I877205b3cc1014b50ccccf6037a2f4034c07543e
Bug: skia:12665
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506538
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-02-10 14:24:39 +00:00
John Stiles
fd36683fe6 Improve parser behavior with invalid statements inside a Block.
Previously, when the parser found a bad statement inside a Block, it
would stop processing that Block entirely. This caused our brace
matching to fall out of balance. block() would normally only return once
the Block's closing brace was consumed, but in this case, the closing
brace would still be in the parse stream awaiting consumption even
though block() had returned.

Now, when a bad statement is found inside a Block, we just ignore it and
continue processing. (I tried injecting a poisoned statement as well,
to see if it would affect the test results, but they were identical.)
This seems to generate somewhat better errors.

Change-Id: I8dc781d5602bf99d7610f8280cde8b7c1925cb65
Bug: skia:12868
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506463
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2022-02-10 14:22:38 +00:00
John Stiles
cff69664ad Update DM::Result to check format strings.
To avoid ambiguity, the constructor only takes an SkString now instead
of accepting variadic arguments. This functionality was only used in one
place, so this doesn't affect the code in any meaningful way.

Change-Id: I33d2e880e3e1430cea80ca47270dd823221e5a2a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506618
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-02-10 14:18:22 +00:00
John Stiles
39b978241b Update code to prepare for -Wformat-nonliteral.
-Wformat-nonliteral does not work with variadic templates, and requires
a constant format string.

These changes uncovered one incorrect format string (%u -> %lu for a
DWORD in dm.cpp)

Change-Id: Id54a5d6cbcb607ff32c758f4a9d346a7aba70df3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506616
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-02-10 14:17:33 +00:00
Robert Phillips
dd579d3d6e [graphite] Repurpose graphitestart GM for shader testing/debugging
Bug: skia:12701
Change-Id: I743e4717f3716717bd35e1eea0f504a1f9ac6dc4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506536
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-02-10 14:12:16 +00:00
Robert Phillips
4b583185ff [graphite] Fix two bugs wrt uniform uploading
Namely:
  we were always uploading uniforms to the front of the uniform buffer
  the gradient colors are stored as float4s - not half4s

Bug: skia:12701
Change-Id: Ic7a669566454d2c00b499cabf8f659ba08b0cedc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506159
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-02-10 14:01:41 +00:00
skia-autoroll
21a92dff8f Roll ANGLE from 71d06198c62b to 670a6e476ea4 (10 revisions)
71d06198c6..670a6e476e

2022-02-10 m.maiya@samsung.com Ignore invalid texture type error
2022-02-10 kpiddington@apple.com Metal: Fix multisample resolves.
2022-02-09 cclao@google.com Vulkan: Fix incorrect DescriptorSet's bufferInfo in XFB emulation path
2022-02-09 angle-autoroll@skia-public.iam.gserviceaccount.com Roll VK-GL-CTS from 97ceb2222747 to b594e2aabae9 (64 revisions)
2022-02-09 cnorthrop@google.com Test: Add Lords Mobile trace
2022-02-09 jmadill@chromium.org Fix perf test runner script.
2022-02-09 jonahr@google.com Add keying on backend to ANGLE Display caching.
2022-02-09 sergeyu@google.com Allow surface creation in DisplayVkNull
2022-02-09 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from e576ca6011cd to 0915ab4bddf7 (6 revisions)
2022-02-09 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 817a527fde8c to 60719c9cd084 (571 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 herb@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: herb@google.com
Test: Test:
Test: Test: ContextNoErrorTest.InvalidTextureType*
Test: Test: angle_perftests --gtest_filter="*lords_mobile*"
Change-Id: I4246c432faba06d80c955d59096c57a20fb6e1eb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506600
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-02-10 05:28:39 +00:00
skia-autoroll
4364a6345c Roll SwiftShader from 0915ab4bddf7 to cbd31d271e4c (3 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/0915ab4bddf7..cbd31d271e4c

2022-02-09 sugoi@google.com Dynamic state refactor
2022-02-09 sugoi@google.com VK_EXT_subgroup_size_control support
2022-02-09 capn@google.com Add compute benchmarks

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 herb@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: herb@google.com
Change-Id: I9edb1d949bd248dbe3c934ad8dcf6f7e12eb5ef9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506599
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-02-10 04:52:39 +00:00
skia-autoroll
b22fa2cfdc Roll Chromium from 5826a77e26c0 to 4c42b6a53bab (541 revisions)
5826a77e26..4c42b6a53b

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

To file a bug in Chromium: https://bugs.chromium.org/p/chromium/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:Perf-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-CommandBuffer;skia/skia.primary:Test-Mac10.13-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-CommandBuffer
Tbr: herb@google.com
Change-Id: I2a1359b53193113b8a003995e7511452fae80553
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506598
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-02-10 04:50:12 +00:00
skia-autoroll
5a2135af56 Roll Dawn from 73b577e9c629 to 47f051984b88 (11 revisions)
https://dawn.googlesource.com/dawn.git/+log/73b577e9c629..47f051984b88

2022-02-10 jiawei.shao@intel.com D3D12: Only set root parameters for dynamic storage buffers when needed
2022-02-09 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 35cc6631307c to 597fc4cdbe07 (4 revisions)
2022-02-09 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 0915ab4bddf7 to cbd31d271e4c (3 revisions)
2022-02-09 shrekshao@google.com Add error directives for api.h/api_cpp.h #ifdef __EMSCRIPTEN__
2022-02-09 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from d21ebe74bd9c to 35cc6631307c (1 revision)
2022-02-09 cwallez@chromium.org Mark 1D textures as safe.
2022-02-09 senorblanco@chromium.org Set vulkan_loader_shared to false on Mac.
2022-02-09 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll ANGLE from 1b9774f57784 to 9cfd872447fd (4 revisions)
2022-02-09 cwallez@chromium.org Metal: Fix leak of MTLVertexDescriptor when using vertex pulling
2022-02-09 enga@chromium.org tint->dawn: Move src/dawn_tests -> src/dawn/tests
2022-02-09 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 8ccc63f045d5 to 0915ab4bddf7 (2 revisions)

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from d21ebe74bd9c to 597fc4cdbe07

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 amaiorano@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: amaiorano@google.com
Change-Id: I248d97c7ddd0b61a9112987841adde5c313ebd5b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506601
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-02-10 04:42:09 +00:00
Ben Wagner
1f813e4c7f Fix parallel array length mismatch in test.
In the recently introduced FontConfigInterface_MatchStyleNamedInstance
test the highBitsExpectation vector was one bool too short. Because this
was a std::vector<bool> AddressSanitizer because as silent because all
the bits fit in one underlying storage unit. It isn't clear why
MemorySanitizer did not seem to catch this. In any event,
highBitsExpectation[6] was effectively a random causing the test to fail
about half the time.

Restructure these parallel arrays into a Test struct so that the
expectations are obvious and line up. Also make everything constexpr.

Bug: skia:12916
Change-Id: Iaaabb7aef5e041b551a9e2302f954c64509427f8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506160
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2022-02-09 22:32:39 +00:00
Herb Derby
81d4b5d5b4 use SkAutoDescriptor in remote glyph cache
Thoroughly exercise the new descriptor de-serializer.

Change-Id: If8208ec5b0f0a8e0db250d2cd723b6970c5f4ff2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506464
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-02-09 21:13:08 +00:00
Brian Osman
cd189e8a1d Remove default/deprecated arguments to makeShader calls
Bug: skia:12643
Change-Id: I37e1718a20283dfb814c85260257d57bac2b7b34
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506211
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
2022-02-09 20:41:23 +00:00
Jim Van Verth
6d7d508667 [graphite] Add buffer setup for texture uploads
Takes the given texture data and destination rectangle, copies it into
a buffer, and stores the destination textureProxy, buffer, and
associated BufferTextureCopyData into an UploadCommand.

Bug: skia:12845
Change-Id: Icba8b9e56ac0d79083c54fe529bd7e35ddb6e23d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/505798
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-02-09 19:58:44 +00:00
Kevin Lubick
0fac7baa61 Remove experimental/xform
Requires cr/427505724 to land also.

Change-Id: I88465a234b48abf4b1ac97146c8adcf9638babd0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506396
Reviewed-by: Brian Osman <brianosman@google.com>
2022-02-09 19:56:49 +00:00
Kevin Lubick
7170ab66a7 [infra] Remove old error message
Change-Id: I1bc0dbaacb8268765c6e16c21f89b038b4a0b853
BUG: skia:12923
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506461
Reviewed-by: Herb Derby <herb@google.com>
2022-02-09 19:40:46 +00:00
Derek Sollenberger
167c959633 Fix bug that caused non-GPU unit tests to run in SkQP
Bug: skia:12796
Change-Id: Ica49cfa3a4d58c6bfb5179e2a004a8ea21685d21
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506456
Commit-Queue: Derek Sollenberger <djsollen@google.com>
Auto-Submit: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2022-02-09 19:37:50 +00:00
Kevin Lubick
9cb74e9079 [bazel] Compile gms for wasm and WebGL
PS 1 is re-generating existing BUILD.bazel files
PS 2 is generating BUILD.bazel files for tests/gms
PS 3+ makes modifications to build all of the gms and tests.

It is recommended to view this CL with just a diff between
PS 2 and the end, due to the large amount of generated changes
in PS 1 and 2.

We make a filegroup for the gms and tests because they need
to be compiled as one large blob in order for the registries
to work. Maybe in the future we will break these up, but at least
for WASM/JS, the overhead of starting a browser for each new
test would likely grind things to a halt, so we just group them
all together for now. It's also the most similar to what we
currently do.

In gm/BUILD.bazel and tests/BUILD.bazel, we add a cc_library
that encapsulates all of the deps of the tests, so we can
easily include that the build. These were discovered via
trial and error, not anything automatic or systematic.

The is_skia_dev_build config_setting is very similar to the
GN equivalent from which it was based.

The list of gms and tests to skip (e.g. which are incompatible
with WASM) was determined by building the wasm bundle:

modules/canvaskit$ make bazel_gms_release
tools/run-wasm-gm-tests$ make run_local_debug
# Don't forget to click the button on the screen after the
# browser loads

This way of invoking the tests will be replace soon with
`bazel test <something>`. As such, I didn't bother fully
documenting the current way.

Suggested review order:
 - modules/canvaskit/BUILD.bazel taking note that we always
   use profiling-funcs to make the stacktraces human readable.
 - gm/BUILD.bazel and tests/BUILD.bazel to see the lists of
   gms/tests. Notice the tests are roughly partitioned because
   we don't support things like vulkan/PDF in the wasm build
   and we will want a way to not build certain tests for
   certain configurations
 - tools/* noting some of the cc_libraries added to make
   dependencies easier to add when needed.
 - All other files.

Change-Id: I43059cd93c28af1c4c12b93d6ebd9c46a12d381f
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/506256
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-02-09 18:56:17 +00:00