Commit Graph

59855 Commits

Author SHA1 Message Date
Julia Lavrova
cf3e1c4fe9 Remove DrawOptions (except direct drawing)
That would allow us not to query glyph bounds

Change-Id: Ibee53446e33fd6a54affc1ded438191186cd21be
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526296
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2022-04-01 15:46:39 +00:00
Michael Ludwig
10a3cc545c [graphite] ClipStack bounds use skgpu::Rect
Bounds are stored as floats, preserving exact coords instead of trying
to round in or out for pixel bounds. This is the major functional
implication that now differentiates behavior from v1::ClipStack.

Most of the changes are just updating to the appropriate API. One thing
to note is that Rect::intersect() outputs an empty/negative rectangle
if the inputs do not intersect, which is what we want in ClipStack but
had to be explicitly checked for with SkRect/SkIRect's behavior.

Bug: skia:12698
Change-Id: I94e8c67eba5091406f8722f7f8b76938db9eac3c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526458
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-04-01 14:07:31 +00:00
Brian Salomon
dcd21712d8 Reland "Change GPU LOD bias to be just shy of -.5."
This is a reland of commit 355f0f9fa2

Original change's description:
> Change GPU LOD bias to be just shy of -.5.
>
> We want to ensure that when a MIP level is 1:1 with device space
> that kNearest picks that level instead of a larger level.
>
> Bug: skia:13078
>
> Change-Id: I703d08ab394e1d39b31d16946067a2ead415c72a
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/524224
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

Bug: skia:13078
Change-Id: I7fc765a8718d770ebdac68adf9c59ff15d8c8451
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526517
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-04-01 13:29:38 +00:00
skia-autoroll
67c163ca48 Roll ANGLE from 3bdbfbf868e3 to d3492eef5c78 (10 revisions)
3bdbfbf868..d3492eef5c

2022-04-01 m.maiya@samsung.com Vulkan: Handle border color for stencil component
2022-03-31 cclao@google.com Vulkan: Create buffer for vertex array if robust enabled
2022-03-31 lexa.knyazev@gmail.com Metal: Remove DrawBaseVertexVariantsTest suppressions
2022-03-31 m.maiya@samsung.com Fix Surface use-after-free bug
2022-03-31 kpiddington@apple.com Metal: Buffer data is not correctly updated
2022-03-31 m.maiya@samsung.com Vulkan: Support GL_EXT_EGL_image_storage extension
2022-03-31 syoussefi@chromium.org Vulkan: Fix deadlock in device loss
2022-03-31 syoussefi@chromium.org Vulkan: Don't reserve varyings for xfb if VK_EXT_depth_clip_control
2022-03-31 syoussefi@chromium.org SPIR-V Gen: Fix aliasing out parameters
2022-03-31 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from f9e3d5a50ca2 to e37ba68c0fde (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/angle-skia-autoroll
Please CC jcgregorio@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: jcgregorio@google.com
Test: Test: EGLSurfaceTest.SurfaceUseAfterFreeBug*
Test: Test: dEQP.GLES31/functional_texture_border_clamp_range_clamp_nearest_unorm_depth_uint_stencil_sample_stencil
Change-Id: I547d3d01a1ca52501cf7cdedd65db1b6e9b6143b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526537
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-04-01 05:24:41 +00:00
skia-autoroll
421cff8320 Roll SwiftShader from bc5bec05c369 to afcbbd0ad3b5 (2 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/bc5bec05c369..afcbbd0ad3b5

2022-04-01 sugoi@google.com Fix inline uniform block update
2022-03-31 swiftshader.regress@gmail.com Regres: Update test lists @ bc5bec05

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 jcgregorio@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: jcgregorio@google.com
Change-Id: I236a9f9e1948123e6409da68c08e625f28cadb50
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526538
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-04-01 04:51:05 +00:00
Michael Ludwig
059945f229 Consider edge AA flags when checking if edge coords land on pixel boundaries
Bug: skia:13114
Change-Id: I421fbddbe92cceac7454ceee4663a41aaae72929
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526026
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-04-01 00:51:21 +00:00
Michael Ludwig
fa88291aa0 Revert "Change GPU LOD bias to be just shy of -.5."
This reverts commit 355f0f9fa2.

Reason for revert: blocking chrome roll, should be #if defined(...) for the guard

Original change's description:
> Change GPU LOD bias to be just shy of -.5.
>
> We want to ensure that when a MIP level is 1:1 with device space
> that kNearest picks that level instead of a larger level.
>
> Bug: skia:13078
>
> Change-Id: I703d08ab394e1d39b31d16946067a2ead415c72a
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/524224
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

Bug: skia:13078
Change-Id: I42d6e99509a87f0354f104f2c0177e78cf0d0e21
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526462
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2022-04-01 00:51:07 +00:00
Brian Salomon
97efceeded Always copy base level in SkImage_Raster::onMakeWithMipmaps
We already do this for cached SkSurface snapshot images. However,
sharing the SkPixelRef among any SkImage_Rasters with different
SkMipmaps interacts badly with SkImage texture caching and likely
other image caches.

Bug: skia:11983
Change-Id: I07bb7a93ffb79afb7f8268cd5159ee22f58da1e7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526456
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-03-31 20:48:55 +00:00
Kevin Lubick
5e8f45faf1 [includes] Prepare for moving SkColorSpace to forward declare
This updates all our callsites in preparation for removing
the #include "include/core/SkColorSpace.h" from SkImageInfo.h

According to go/chrome-includes [1], this will save ~150MB
(0.07%) from the compilation size. I think SkColorSpace is
a big include because it loads the skcms header, which is
big.

The follow-on CL will remove that link, once clients have
been updated as well.

[1] https://commondatastorage.googleapis.com/chromium-browser-clang/chrome_includes_2022-03-31_124042.html#view=edges&filter=%5Ethird_party%2Fskia%2Finclude%2Fcore%2FSkImageInfo%5C.h%24&sort=asize&reverse=&includer=%5Ethird_party%2Fskia%2Finclude%2Fcore%2FSkImageInfo%5C.h%24&included=&limit=1000

Change-Id: I1b5ff491ac495317b0e5af3a2082b080d43697ae
Bug: skia:13052
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525639
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-03-31 19:50:10 +00:00
Greg Daniel
6b52f372c3 [graphite] Add a result param to graphite callbacks.
Bug: skia:12974
Change-Id: Ie10ef5c8ab4e04647233a6039d22a2eb6437d6bf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526022
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-03-31 19:26:28 +00:00
Michael Ludwig
027b9c0d38 Remove GrAA parameter from drawing functions that support per-edge AA
Bug: skia:13114
Change-Id: I653ab746927abdd1491e070e2e27252bf056d233
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526024
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-03-31 19:25:26 +00:00
Brian Salomon
e679a08f9a Remove GrGLCreateNativeInterface
Bug: skia:13087
Change-Id: Ibaf7b223631a7282393cb670779a0a769bd0f86a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526301
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-03-31 19:01:34 +00:00
Brian Salomon
355f0f9fa2 Change GPU LOD bias to be just shy of -.5.
We want to ensure that when a MIP level is 1:1 with device space
that kNearest picks that level instead of a larger level.

Bug: skia:13078

Change-Id: I703d08ab394e1d39b31d16946067a2ead415c72a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/524224
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-03-31 16:58:30 +00:00
Michael Ludwig
7b04832cbe [graphite] Initial ClipStack paired down from v1::ClipStack
PS1 is the exact contents of src/gpu/v1/ClipStack.* copied to
experimental/graphite/src.

PS2+ shows all the changes to remove v1-only features and update some of
the types over to what graphite uses. The major changes are:
1. FragmentProcessors, clip atlases, stencil mask writing, and SW mask
   writing are gone.
2. SW mask caching and tracking are gone.
3. Graphite is effectively in the "forceAA" mode that the original clip
   stack supported. So branches that focused on non-AA, or comparing AA
   or handling cases where elements' AA mismatched could all be removed.
4. Updated to use Graphite's Shape and Transform classes. Did not go as
   far as moving the bounds from SkIRect to Rect, but since everything
   is AA, it will be much simpler to switch to comparing float bounds
   directly and not worry about rounding in or out. That's a more
   substantial change so will come later.
5. The original ClipStack had a "Draw" type that was used to compute
   clip interactions between SaveRecords and Elements. It was always
   just device-space bounds because of limitations of the GrClip API.
   In Graphite, we can use the exact same set of info for Draws and
   Elements, making interaction tests share code and be more accurate.
   Since that's a more involved change, I just removed the simpler Draw
   type from this version for now.
6. Tried to add TODOs for what logic and extra state will need to be
   added to actually apply graphite's clip stack as depth-only draws.

Bug: skia:12698
Change-Id: I418703e8f759cd5e1ddd1e302a864bf2204cf040
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525516
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-03-31 16:45:58 +00:00
Kevin Lubick
dabc752c3f [canvaskit] Add test to prove we have COLRv1 font support
Pardon the duplicate test file, I have not yet finished
moving the CanvasKit tests to be on Bazel. When I do,
the duplicate (font.spec.js) will go away.

Change-Id: I6ad468f3f322280ffa25429fb8732e7266703e91
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526297
Reviewed-by: Ben Wagner <bungeman@google.com>
2022-03-31 16:14:31 +00:00
Herb Derby
1422409d32 bound glyphCount by the number of bytes remaining
Since the data for a glyph is always > 4, bound the count to
buffer.available() / 4.

Bug: oss-fuzz:45885

Change-Id: I5c7925487bf11c673c4375c69e8ee8cd4ff4b4a6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525979
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-03-31 15:14:05 +00:00
Herb Derby
3ece2127e9 pick a size if the hint is out of bounds
The fuzzer has produced a hint such the add sizeof(Slug) make the
value negative. Since this is just a hint, and the arena can always
add more blocks of needed. Just pick a nice size if the hint looks
to small or big.

Bug: oss-fuzz:45893

Change-Id: I196e93a441a586340da6f0626f00c660f3858c64
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526030
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-03-31 15:13:21 +00:00
Robert Phillips
0ec0c38e2e [graphite] Add ExtractRenderStepData
This doesn't reuse memory w/in the gatherer but sets us up to do so.

Bug: skia:12701
Change-Id: If5ed962e73609b113581ed2bd681e872fe3214c0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526029
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-03-31 14:45:54 +00:00
John Stiles
ee9ecfa478 Disable test OutParamsAreDistinctFromGlobal on Wembley.
Change-Id: I8a2bd5596b10f76b77cfa834cc5d592c249457ee
Bug: skia:13115
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526256
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
2022-03-31 14:12:03 +00:00
Jim Van Verth
0c50659cfe [graphite] Move writePixels logic up into Device
Following the philosophy that DrawContext should be as simple as
possible, the work that sets up the upload should be done higher up.
If we need to share the code, that can be handled by a helper class or
function.

Bug: skia:12845
Change-Id: Ib0308ce816e545ccffb5ddbe3d9bcc302349397f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526025
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-03-31 14:04:37 +00:00
Kevin Lubick
3f335b6e01 [canvaskit] Can build debug mode with RBE
Release mode requires https://github.com/emscripten-core/emscripten/pull/16640
to land

Change-Id: I70295d4c2f884ebeb400bd30f4ef28d7695e48df
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526047
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2022-03-31 13:59:15 +00:00
Brian Salomon
e4601b0864 Fix issue mipmapped SkImages made from SkSurface_raster snapshots.
This fixes a bug with the following sequence:

Make SkSurface_Raster, draw to it
snap an image, A, from the surface
make image B by calling withDefaultMipmaps() on image A
Let image A be destroyed.
draw to surface again
snap another image, C, from the surface

Image C and image B would now share the same SkPixelRef, reflecting
the final contents of the SkSurface.

Add a GM that exercises the bug when run through either the pic- or
serialize- vias and DDL.

Bug: skia:13111
Change-Id: Ib079163c84f420baf62fa7960110386303b8fb93
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525517
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-03-31 13:21:59 +00:00
Ethan Nicholas
3f5184cfa6 Added an SkSL Operator enum
SkSL::Operator was previously just a thin wrapper around Token::Kind and
everything was therefore written in terms of Token. Since Token is not
accessible from include/ (and we don't want it to be), this creates an
actual Operator enum and eliminates the dependence on Token. This will
enable followup changes to reference Operator from within the DSL
include files.

Change-Id: I49555c9151618fd15970a303d2284972c78c3f21
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525976
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2022-03-31 13:20:57 +00:00
skia-autoroll
54d5be6c66 Roll ANGLE from 9a0b306dcc6d to 3bdbfbf868e3 (9 revisions)
9a0b306dcc..3bdbfbf868

2022-03-31 m.maiya@samsung.com Vulkan: Adjust border color
2022-03-31 johncunningham@apple.com WebGL ReadPixels validation is incorrect.
2022-03-30 syoussefi@chromium.org Vulkan: Move mid-RP color clear to loadOp if content undefined
2022-03-30 syoussefi@chromium.org Vulkan: Enable framebuffer fetch on SwiftShader
2022-03-30 gman@chromium.org Metal: Fix for not submitting command buffers in order
2022-03-30 lubosz.sarnecki@collabora.com Tests: Add Super Mario Run trace.
2022-03-30 mfoltz@chromium.org [Cast Convergence] Remove is_cast_desktop_build from ANGLE.
2022-03-30 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from e38e969e37fe to f9e3d5a50ca2 (4 revisions)
2022-03-30 lubosz.sarnecki@collabora.com FrameCapture: Use getCompressedTextImage.

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 jcgregorio@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: jcgregorio@google.com
Test: Test: angle_perftests --gtest_filter="*super_mario_run*"
Test: Test: dEQP-GLES31.functional.texture.border_clamp.*
Change-Id: Ia7ac270f6e5c0e8b77fd60d0893424e0d5f8a379
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526157
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-03-31 05:36:01 +00:00
John Stiles
14c689c283 Remove GN support for DSL-based fragment processors.
We needed to do a trick to convince GN to work with a file that had two
extensions (`.dsl.cpp`). We no longer compile fragment processors, and
we definitely don't compile them into DSL code, so this trick is
obsolete.

Change-Id: I918d37835e23071a4cb5143cb057f86a23b91152
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526031
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-03-30 22:28:37 +00:00
John Stiles
61e7d06c48 Remove skia_compile_processors gn flag.
This flag was meant to control compilation of .fp files, which no longer
exist. Its only meaning now is a synonym for `skia_compile_sksl_tests`.
If you had `skia_compile_processors` enabled in your gn args, you can
replace it with `skia_compile_sksl_tests`.

Change-Id: I49fe58aaf0e60d3998ec43c51c1372a6acad980a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526028
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2022-03-30 22:01:30 +00:00
Kevin Lubick
7c6a1526f7 Free FontChains after test completes
ASAN detected this leak.

Change-Id: I7f54cbe35ac36d288d2fa676cf0192a793686ba1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526077
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-03-30 21:02:55 +00:00
Kevin Lubick
145e18f5cc Fix memory leak in AAClipTest
We were not freeing the memory allocated by copyToMask in
one place.

Change-Id: I4404395e8bc2beb43eca5226e947c42b22805ef7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526076
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2022-03-30 21:02:55 +00:00
Jim Van Verth
0361abf39d Fix setup for iOS simulator on arm64 Macs.
The current setup for the iOS simulator keys off of the fact that iOS
runs on ARM CPUs, and Macs (prior to M1) ran on x64 CPUs. So setting
the target_os to "ios" and the target_cpu to "x64" will indicate use
of the simulator. On M1, they have the same CPU architecture, so we
need another method to indicate use of the simulator SDK.

Also added a check to disable code signing, which is not needed for
running on the simulator.

Bug: skia:12880
Change-Id: I668121010cc557546c4a4e4960601a732bb985c5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526017
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-03-30 20:06:39 +00:00
John Stiles
d370e89353 Disable test OutParamsAreDistinctFromGlobal on some platforms.
Windows + Intel GLSL and Android + Adreno GLSL do not recognize aliasing
against the global and fail the test.

Change-Id: I4c1f950f7addf6691a8db989d93b727dbc97742e
Bug: skia:13115
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526023
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-03-30 19:58:38 +00:00
Michael Ludwig
7f5033d714 Take edge AA flags into account when applying implicit device bounds clip
Bug: skia:13114
Change-Id: I1e6552aaeee68eaf4e50e42da2a7761953b06415
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526019
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2022-03-30 19:46:17 +00:00
John Stiles
121d4a2e4b Move skslc dependencies into a dedicated list.
I'm considering migrating SkSL precompilation/dehydration into a
separate binary from skslc. It would need the exact same set of Skia
dependencies. So let's factor them out.

Change-Id: I9b000ef058f7253e142cf5a8a603e468beb4d6f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526020
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-03-30 18:50:12 +00:00
John Stiles
674eb326f4 Improve distinct-out-param test cases.
Added new aliasing tests inspired by syoussefi@'s ANGLE changes at
http://go/crrv/c/3561278.

Change-Id: Ifa312faa9503b211b7c09edd2abd5087ead35e5f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/526018
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Arman Uguray <armansito@google.com>
Commit-Queue: Arman Uguray <armansito@google.com>
2022-03-30 18:49:15 +00:00
Kevin Lubick
a43a68a015 [infra] Switch Perf-Debug-ASAN for Perf-Release-ASAN
Also move some more Perf-ASAN jobs to Test-ASAN

Followup to http://review.skia.org/525191

Change-Id: Ic2df058c91f4f07311e4afc7fb68a6b5ed12f592
Bug: 1309590
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525836
Reviewed-by: Greg Daniel <egdaniel@google.com>
2022-03-30 18:23:32 +00:00
Jason Simmons
cbe01216b5 Check font arguments when determining whether text styles have the same font
Change-Id: Ib8289d9ece43781e61db2a3ed080dedef296e539
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525738
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Jason Simmons <jsimmons@google.com>
2022-03-30 17:42:29 +00:00
John Stiles
351b86128a Simplify Porter-Duff coefficient blending expression.
The earlier implementation generated a very very long expression on a
single line. I split out the logic across into multiple lines, and
also realized that the majority of the logic was repeated two times. Now
we use a vec2 to avoid spelling out the math twice.

Change-Id: I1a60e3663de3d774c5abdcd166734b07ea3dbaaa
Bug: skia:13109
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525841
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2022-03-30 17:28:53 +00:00
Jorge Betancourt
c422f3ea06 Revert "add egl through swiftshader to unix builds"
This reverts commit 1df5520f50.

Reason for revert: blocks g3, need supplement cl to land before pushing this one

Original change's description:
> add egl through swiftshader to unix builds
>
> To be submitted with g3 cl/438169003
>
> Change-Id: Idbdfc2e5b64d26a0dae9773fa08caabe4acf9147
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525839
> Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
> Auto-Submit: Jorge Betancourt <jmbetancourt@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Florin Malita <fmalita@google.com>
> Commit-Queue: Florin Malita <fmalita@google.com>

Change-Id: I6ab6fd6c583d4901c4e71845e0bf4d431b55644f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525840
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2022-03-30 16:07:14 +00:00
Jorge Betancourt
1df5520f50 add egl through swiftshader to unix builds
To be submitted with g3 cl/438169003

Change-Id: Idbdfc2e5b64d26a0dae9773fa08caabe4acf9147
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525839
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Auto-Submit: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2022-03-30 15:05:35 +00:00
Kevin Lubick
cfd219ed33 [debugger] Fix missing include in WASM bindings
Change-Id: I9395b8f4ced3fafe2bbd144e2c90e23af65ee54a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525896
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2022-03-30 14:59:56 +00:00
John Stiles
9287beb9eb Use a uniform to drive Porter-Duff shader composition.
This lets most simple Porter-Duff based Compose operations share the
same shader text; the values in a uniform control which blend mode we
will use. This is only enabled in reduced-shader mode.

Best-case scenario I could find:
- Original: http://screen/EkXsnfNPC9CxiwE
- Uniforms: http://screen/9rJLe6JMrhteD24

Change-Id: I0edc7910a9a2ae7f4e5abbd57128d7b3b52971bf
Bug: skia:13109
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525317
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-03-30 14:44:47 +00:00
Robert Phillips
2e9bc4700a [graphite] Set up to use fewer allocations when collecting uniforms
This doesn't actually change the memory allocation but sets up to do so.
90% of the CL is just renaming SkPipelineData to SkPipelineDataGatherer.
The main interesting changes are those to:
    ExtractPaintData
    in DrawPass.cpp
and SkPipelineData.h/.cpp

Bug: skia:12701
Change-Id: I3e18f9b3f16166649de1bf1f4399d5521d817eb3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/524763
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2022-03-30 14:44:41 +00:00
Greg Daniel
6368d39a9e Remove vk workaround to do partial clears as draws on adreno.
Qcomm did some investigations of this workaround, and even though it was
giving some cpu savings, it was causing a big hit to GPU performance and
power. So we're removing this now to get back the various wins on the
GPU.

Change-Id: I01ba4e271dc02ae4ab6155fc794a5a1e3c796341
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525638
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2022-03-30 14:11:58 +00:00
Herb Derby
2b925c4a21 remove device capture from SkNWayCanvas
Change-Id: Icc6d1345c59d6f6529db39bf4b5bd8097f1f6b5f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525837
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2022-03-30 14:07:41 +00:00
Kevin Lubick
556ca8f7ee [includes] Enforce IWYU for //tools/debugger/...
This moves the Build-Debian10-BazelClang-x86_64-Release-IWYU
job from experimental to on when a file in one of the
folders that we enforce IWYU is modified (currently
for svg, sksl, and now, debugger).

Change-Id: Ia6fe1e7b30fc486db3eb081b6a64bc4c250cbf0b
Bug: skia:13052
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525796
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-03-30 13:53:13 +00:00
John Stiles
4cd5e50c5d Add a hardwired-blend-mode version of GrBlendFragmentProcessor::Make.
When `Make<BlendOp>(src, dst)` is used, the blend mode will always be
hard-coded into the shader, instead of using a uniform to apply a
generic Porter-Duff blend.

Change-Id: I59a05eea3417b1880cef63738c0116d19f01ee3e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525641
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2022-03-30 13:51:06 +00:00
skia-autoroll
33782728ee Roll ANGLE from 53e432febda1 to 9a0b306dcc6d (8 revisions)
53e432febd..9a0b306dcc

2022-03-30 aeubanks@google.com Remove set but otherwise unused variables
2022-03-30 syoussefi@chromium.org Vulkan: Use storeOp=None more opportunistically
2022-03-29 syoussefi@chromium.org Vulkan: Remove suppression of fixed VVL errors
2022-03-29 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 8da5cdbde887 to e38e969e37fe (4 revisions)
2022-03-29 lubosz.sarnecki@collabora.com Tests: Add Shadowgun Legends trace.
2022-03-29 geofflang@google.com Reland: Emulate RGB10 (no alpha) on desktop OpenGL.
2022-03-29 steven@valvesoftware.com Vulkan: add tests for clearing/drawing after invalidate
2022-03-29 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 737665b8eab1 to 8da5cdbde887 (2 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 jcgregorio@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: jcgregorio@google.com
Test: Test: angle_perftests --gtest_filter="*shadowgun_legends*"
Change-Id: I280b7e4288b9636be9f2a8e1e22532bf5957397e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525777
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-03-30 05:31:37 +00:00
skia-autoroll
2eeedae56f Roll SK Tool from 7b4d14262c73 to 0cb7d512aa40
https://skia.googlesource.com/buildbot.git/+log/7b4d14262c73..0cb7d512aa40

2022-03-29 rmistry@google.com [cherrypick-watcher] Add gerrit library for cherrypicks
2022-03-29 rmistry@google.com [cherrypick-watcher] Add Branch and CherrypickOf search terms
2022-03-29 rmistry@google.com [cherrypick-watcher] Add CherrypickOfChange/CherrypickOfPatchSet to go/gerrit

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/sk-tool-skia
Please CC kjlubick@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

Tbr: kjlubick@google.com
Change-Id: I28f2e2c1e1ac314e89ce1a04ccb1ec1195f74e2f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525701
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2022-03-29 21:19:57 +00:00
Herb Derby
f54d418b01 enable pictures to record drawSlug
This should fix many issues that Chrome is seeing. The problem is the
picture recorder had no idea about Slug, so the canvas super class
would try to use the device to draw. This hooks up the recorder
to capture drawSlug into the picture.

I tested this with a specialized gl sink in DM which I'm struggling
to check in. But, it was functional enough to show that this works.

Bug: chromium:1302036
Bug: chromium:1307279
Bug: chromium:1306329
Bug: chromium:1307446

Change-Id: I6a27bf43702400c80b2044433e7b00347f522763
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525636
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2022-03-29 19:30:03 +00:00
Kevin Lubick
f5ae4c7e15 [bazel] Use RBE when building task drivers
Local measurements show that using RBE (with a warm cache)
vs local can result in a 2x faster build.

No-Try: true
Change-Id: Ib900a90564f105de848c9aeb0b745e5fec77da53
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525637
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-03-29 18:01:33 +00:00
Kevin Lubick
8442ca1858 [bazel] Run RBE CI tasks on 16 core machines
Because these tasks use RBE, the machines they run on do not
need to be as powerful. In practice, we are seeing a lot of
the build steps be a hit on the remote-cache, so we don't need
the number of Bazel jobs to be as high, so I've arbitrarily
set it to be 100. We can revisit this later if we notice
things are slow.

To facilitate this change, I had to add cloud-platform scope
to all our GCE VMs. There is a script in the infra repo [1]
that helped with this:
go run ./scripts/add_gce_scopes/add_gce_scopes.go \
  --zone us-central1-c --project skia-swarming-bots \
  --scope https://www.googleapis.com/auth/cloud-platform \
  --instance skia-e-gce-100,skia-e-gce-101,...

[1] b103ea24f5/scripts/add_gce_scopes/add_gce_scopes.go

No-Try: true
Change-Id: I7f1e7b1e9e4a22f5383cf9ce1c8c0350e62b5283
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/525577
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2022-03-29 18:00:34 +00:00