Commit Graph

55786 Commits

Author SHA1 Message Date
John Stiles
c766dd5f7b Fix p3_ovals GM on high-DPI displays.
On a Mac with a retina display running Viewer, our canvas' total matrix
has a 2x scale factor applied. This change prevents an assertion from
occurring while viewing slides in Viewer.

(I tried actually compensating for the canvas scale factor as well, but
it didn't actually matter, because the canvas provided by Viewer doesn't
support readPixels either way.)

Change-Id: Ib378c79da96cea8d36815860889ca529d7314adc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419799
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-06-18 17:30:20 +00:00
Brian Osman
4ce5bc2302 Revert "Switch back to non-SkSL matrix color filter for all clients"
This reverts commit b2b5f2beaa.

Reason for revert: Google3 staging

Original change's description:
> Switch back to non-SkSL matrix color filter for all clients
>
> Chrome never made the switch, and if we want to support stripping SkSL
> in CPU builds, we'll want to backtrack here a bit.
>
> Change-Id: I46aba6d0bddd09f6c37a90d9b996e3e28ce66c68
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419157
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: Ib1acea693696422b421b878d78963015e38af69c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419777
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2021-06-18 17:13:52 +00:00
Brian Osman
f62632c7c3 Remove SkShaders::Lerp
It's entirely unused, and trivial for clients to create with SkSL.

Change-Id: I197986232d3706f5af3a197f0fb8e744e1009e5f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419796
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2021-06-18 16:40:08 +00:00
Greg Daniel
0eb35a9e35 Fix gn for skpinfo so it can find vulkan headers.
Change-Id: I25b4751bbf70841666934d17021c507b7cf9c9be
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419816
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-06-18 15:46:39 +00:00
John Stiles
9a2aa9708f Implement SkBlender support in SkVM.
A lot of the SkVM-related setup was already hooked up in
http://review.skia.org/416916. This CL finishes the job by hooking up
the SkPaint's SkBlender field to SkVM, and adds various checks
throughout Skia's software drawing code that can detect the presence of
an SkBlender.

Since only SkVM knows how to render an SkBlender correctly, we now need
to avoid the legacy blitter and RasterPipeline blitter whenever an
SkBlender is present on the paint. This CL fixes the cases that I've
found so far, while testing rendering with ovals and images. I'm sure
there are more cases lurking; these will be uncovered and dealt with in
future CLs.

Change-Id: I1a7b3d6625352b3cba8e4f8d4c61129d08ac6ae7
Bug: skia:12080
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419576
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-06-18 15:33:38 +00:00
Eric Boren
3177f853ea [infra] Fix fetch-sk and fetch-skps
Change-Id: I4b6a31e299eaabd4fdbb469272c3a9fd243a293e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419776
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2021-06-18 15:20:38 +00:00
John Stiles
9b170c6d3f Implement SkBlender support in Ganesh.
SkBlenderBase::asFragmentProcessor now returns a working runtime-blender
FP. This FP is appended to the end of the paintFP chain by
skpaint_to_grpaint_impl when an SkPaint contains an SkBlender, and the
GrPaint's XferProcessor factory is set to kSrc.

Unit tests have been added to verify basic functionality is working as
expected; more thorough drawing tests will be added once the CPU side is
running as well (since we don't want GMs that render differently on CPU
and GPU).

Change-Id: I255abd057fa75d638a9f2612c1a353be4de9e24c
Bug: skia:12080
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419358
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-06-18 15:13:18 +00:00
John Stiles
33d4ac4533 Reorder dithering setup in GrPaint creation.
The dither effect is going to execute before the blend XP (since XPs run
last), so the code is now ordered to reflect that ordering.

Change-Id: I0f06db66c03c4350865842a6d10c389e057f4141
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419778
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-06-18 14:59:54 +00:00
Jim Van Verth
39e9887dc3 Fix iPhone6 Programs test.
We shouldn't need to disable shader derivatives on iOS, so this
should fix the assert in this test.

Change-Id: Icb4fa0af3ad5822e1509f3c9857a8d52c6e85762
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/418578
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2021-06-18 12:47:59 +00:00
Robert Phillips
c3889e8f94 [ngatoy] Fix memory leaks
Bug: skia:11837
Change-Id: Icd80503b16776e821ae2a5491b554eea7094cd9a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419362
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2021-06-18 12:10:29 +00:00
skia-autoroll
c77684a25e Roll ANGLE from f89f244d5259 to 24155b13671f (6 revisions)
f89f244d52..24155b1367

2021-06-18 syoussefi@chromium.org Vulkan: Free DynamicBuffer buffers after dip in allocation size
2021-06-17 jplate@google.com CL: Refactor info structs and fix conformance bug
2021-06-17 geofflang@google.com Disable ANGLE's VK backend on official Chrome Android builds.
2021-06-17 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 734228fd0093 to 7304bd043edc (5 revisions)
2021-06-17 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 72e6254a135d to 84bc198202e5 (1 revision)
2021-06-17 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 3b095d2c5438 to 681ec5b77d1d (186 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 jmbetancourt@google.com on the revert to ensure that a human
is aware of the problem.

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/master/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: jmbetancourt@google.com
Change-Id: I4f206ef564aedabd8b20e06f7851e4199590ea0c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419656
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-06-18 06:10:39 +00:00
skia-autoroll
d4f36e6c8c Roll SwiftShader from 84bc198202e5 to cf2ffd05cbc9 (2 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/84bc198202e5..cf2ffd05cbc9

2021-06-17 sugoi@google.com Increase maximum framebuffer size
2021-06-17 pkasting@chromium.org Fix -Wdeprecated-copy.

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 jmbetancourt@google.com on the revert to ensure that a human
is aware of the problem.

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/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: jmbetancourt@google.com
Change-Id: I703e14137b1926842ee4a8b169dff87fb56989bf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419658
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-06-18 05:12:09 +00:00
skia-autoroll
4e70111224 Roll Dawn from 5b6c1ebce7c6 to b86e45f8ca87 (6 revisions)
https://dawn.googlesource.com/dawn.git/+log/5b6c1ebce7c6..b86e45f8ca87

2021-06-17 cwallez@chromium.org Omit types in most WGSL `var` statements.
2021-06-17 bclayton@google.com wgsl: Suppress all VertexFormatTests when using FXC
2021-06-17 cwallez@chromium.org Add SetIndex/VertexBuffer offset argument alignment constraints
2021-06-17 cwallez@chromium.org WireCmd: disallow optional members with length="otherMember"
2021-06-17 bclayton@google.com wgsl: Fixes for new validation failures
2021-06-17 jrprice@google.com Metal: Remap vertex buffers when using Tint

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 alanbaker@google.com on the revert to ensure that a human
is aware of the problem.

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/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn
Bug: None
Tbr: alanbaker@google.com
Change-Id: I15f98d4c7e175247c28fbf0b8ec4dde9d01a46f9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419657
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-06-18 05:10:19 +00:00
Chris Dalton
abed267359 Reland "Use a custom FP for tessellation atlas clips"
This is a reland of 90a0d9f618

Original change's description:
> Use a custom FP for tessellation atlas clips
>
> Something about GrTextureEffect::MakeSubset was upsetting NVIDIA
> Vulkan. This is cleaner anyway though since we only have to create 2
> fps instead of 3, and since we don't need to make new shaders for
> inverting coverage anymore.
>
> Bug: skia:12102
> Change-Id: I5d03ed12abba5c4053e08062c75ac8d40933b422
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419150
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

Bug: skia:12102
Change-Id: I32c3f698ee22179caee196ef884ae64456595c96
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419563
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-06-18 00:14:13 +00:00
Florin Malita
ca8191b0ad [androidkit] Add linear gradient
Change-Id: Ie08dcde421bb4f67b8467361bda563d5a65ddbd2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/416777
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2021-06-17 20:55:53 +00:00
Mike Reed
12f3e56ed6 Fix typo in link
Change-Id: If2d466b9c22859ef7843fb28a609eae654f9915a
No-Try: true
Docs-Preview: https://skia.org/?cl=419456
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419456
Reviewed-by: Yegor Jbanov <yjbanov@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-06-17 20:55:05 +00:00
Chris Dalton
fd3ec901e0 Revert "Use a custom FP for tessellation atlas clips"
This reverts commit 90a0d9f618.

Reason for revert: Adreno compiler bug

Original change's description:
> Use a custom FP for tessellation atlas clips
>
> Something about GrTextureEffect::MakeSubset was upsetting NVIDIA
> Vulkan. This is cleaner anyway though since we only have to create 2
> fps instead of 3, and since we don't need to make new shaders for
> inverting coverage anymore.
>
> Bug: skia:12102
> Change-Id: I5d03ed12abba5c4053e08062c75ac8d40933b422
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419150
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

TBR=egdaniel@google.com,csmartdalton@google.com,michaelludwig@google.com

Change-Id: I0029410641f3914ab70686e07d1f4faa4952f31c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:12102
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419596
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-06-17 20:44:35 +00:00
Robert Phillips
7c4aa813d3 [ngatoy] Remove old clipping system
Bug: skia:11837
Change-Id: I9f338279ce2648c788c4eb011639ac6d27c946ac
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/418696
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-06-17 20:28:53 +00:00
Jim Van Verth
d812cead57 Revise GrRingBuffer to be more stable with Metal GPU capture.
After switching to use GrRingBuffer for Metal uniforms, it was no longer
possible to use GPU Capture properly -- the command buffer information
was not showing up.

I tracked this down to a few causes:
* Initially CurrentBuffer is NULL. We always added this in startSubmit()
to the TrackedBuffers list, which would then get passed to
Gpu->takeOwnershipOfBuffer().
* GrRingBuffer maintained its own ownership of CurrentBuffer while still
adding it to the TrackedBuffers list and hence to takeOwnershipOfBuffer()
* Even if no new allocation is created, we added SubmitData.

It's unclear why these were affecting GPU Capture, but addressing these
allows it to work now, and it's cleaner.

Bug: skia:12110
Change-Id: Ie947c635ea690f91e1862bc7f443115a2adacfdc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419359
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2021-06-17 20:00:53 +00:00
Robert Phillips
71143950f4 Switch GrMeshDrawOp::Target to be the stand alone GrMeshDrawTarget class
The Tessellator classes will survive in the NGA and they use
GrMeshDrawOp::Target - but GrMeshDrawOp will not survive.

This is a prelude to making all the remaining GrOp-derived classes OGA-only.

Bug: skia:11837
Change-Id: I62dc92e5f42d672342113f12dcedf3435fab993f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419198
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2021-06-17 19:57:43 +00:00
Brian Osman
8e814b3be0 Replace GrClampFragmentProcessor with runtime FPs
Change-Id: Ie271fba0fa26165baac9246eaf1c729df2c7b05a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419476
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-06-17 19:16:53 +00:00
Mike Reed
2e303cb532 Expose Deserialize, so we can wean clients off of flattenable api
Follow-on CL:
https://chromium-review.googlesource.com/c/chromium/src/+/2969803

Bug: skia:12111
Change-Id: Ia64433536186bb4276e5705d7bda022e0bb8bc6f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419360
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-06-17 18:30:53 +00:00
Chris Dalton
90a0d9f618 Use a custom FP for tessellation atlas clips
Something about GrTextureEffect::MakeSubset was upsetting NVIDIA
Vulkan. This is cleaner anyway though since we only have to create 2
fps instead of 3, and since we don't need to make new shaders for
inverting coverage anymore.

Bug: skia:12102
Change-Id: I5d03ed12abba5c4053e08062c75ac8d40933b422
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419150
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-06-17 17:51:53 +00:00
Robert Phillips
294723d690 Move GrOp::VisitProxyFunc to GrTypesPriv.h GrVisitProxyFunc
This is almost purely a query/replace CL (% the #include juggling).
The VisitProxyFunc is used by more than just the Ops and will probably
still be required in the NGA.

This is a prelude to making all the remaining GrOp-derived classes OGA-only.

Bug: skia:11837
Change-Id: If1c127e5c126c676be529ed2a61dd7953abb03d0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419162
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-06-17 17:23:35 +00:00
Brian Osman
171fba72bf Add OptFlags support to GrSkSLFP
Constant output for constant input is determined automatically from the
SkSL. The other two flags are trickier, so we just let the caller
specify them. This will be a key part of migrating .fp files to runtime
FPs.

Restored the preserves-opaque-input flag for color FPs when the color is
opaque (an optimization that was lost when this was initially converted
to a runtime FP).

Change-Id: I6d649ebc23257e2514f42373e51e22d8a65109a0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419161
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-06-17 17:16:53 +00:00
Chris Dalton
e4c64f2282 Don't disable correctness workarounds for SwiftShader
SwiftShader also has bugs that we need to work around.

Bug: b/188239650
Bug: skia:11965
Change-Id: I1a933e5f7e5167e3d466a455b0375758255799d3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419138
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-06-17 16:51:13 +00:00
Greg Daniel
e8502cc73c Add another new nvidia vk extension not covered by layers.
Change-Id: Ia1c775fffff7086ecc1e672792921d2146abd0f4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419158
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-06-17 16:08:53 +00:00
John Stiles
9c2fccbbee Add SkBlender setters and getters to SkPaint.
In this CL, the SkBlender field on the paint is inert; it is not honored
by any of our drawing code. Only setting/getting/hashing the field is
supported. Flattening the SkPaint will not yet preserve the SkBlender.

Change-Id: I69a7a6d20a4c8cc679a3627efbe050bb29e5588c
Bug: skia:12080
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419236
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2021-06-17 16:07:14 +00:00
Ben Wagner
e07555f6aa Build HarfBuzz without ICU support
In addition to reducing the dependency footprint of HarfBuzz as a
library, removing the slow conversion from ICU script to HarfBuzz script
representation should speed things up a bit. Additional clean up to
remove the no longer used SkUnicodeScript parameter will be put off
until later as a separate API change.

Bug: skia:12095
Change-Id: Ib7982a59670cc9c25cb1489b9622a98968ae1a38
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419196
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2021-06-17 15:44:13 +00:00
Ben Wagner
597da9e5e2 Only take DWrite mutex on older versions
If IDWriteFontFace4 is present on the created typeface, don't take any
extra locks. This should imply a new enough dwrite.dll to avoid thread
safety issues in the DirectWrite caches reported with Windows 8 and 8.1.

Bug: chromium:615880
See-also: https://codereview.chromium.org/1421433004
See-also: https://codereview.chromium.org/1424093002
Change-Id: I4d7adfdbd2e7ef5fd22dc7b10c9bf25eea48651e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/418416
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2021-06-17 15:41:13 +00:00
Brian Osman
cc2d073020 Remove SkPaint::getHash
This was a particularly bad hash (A == B didn't imply
hash(A) == hash(B)). It was also entirely unused.

Change-Id: Id923bf1035effce04e12b1cc01d1c6aa4d11fdb6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419336
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2021-06-17 14:59:23 +00:00
Brian Osman
b2cb817d23 Add the concept of an "input" FP to GrSkSLFP
FPs are used to represent effects with varying semantics. In particular,
shaders (that generate colors with no real input), and color filters
(that always have a "primary" input color on which they operate).

Even FPs that are not directly tied to a particular SkShader or
SkColorFilter tend to fall into these two categories. GrSkSLFP was
tailored to the shader semantics. It always supported having child FPs,
but these weren't considered "special" in any way - there could be
multiple, and each one could be sampled in whatever way the SkSL wanted.

This CL adds a dedicated "input" FP slot, so that color filters (and FPs
that resemble color filters) can naturally map better. Previously, we
had to inject an additional FP to do composition of the input and the
SkSL. That worked fine - this change is really about cutting down on
allocations and extra CPU work for that extra FP in the tree.

Change-Id: Ic37457b31f8ed7b4aa8d814a5e78806caa19e1c5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/418739
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-06-17 14:06:23 +00:00
Kevin Lubick
fba8a742cb [canvaskit] Deploy 0.28.0 to npm
Change-Id: Ia1f97a476816b7e9d5a7d994b41676fb21979783
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419356
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2021-06-17 14:02:23 +00:00
Kevin Lubick
c5f8433d47 [canvaskit] Add known swiftshader bug to Changelog
b/188239650

Change-Id: I371b24bc7210decd3cba22e6adc2432a688f0059
Bug: skia:11965
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419156
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2021-06-17 13:49:04 +00:00
Brian Osman
b2b5f2beaa Switch back to non-SkSL matrix color filter for all clients
Chrome never made the switch, and if we want to support stripping SkSL
in CPU builds, we'll want to backtrack here a bit.

Change-Id: I46aba6d0bddd09f6c37a90d9b996e3e28ce66c68
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419157
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-06-17 13:22:11 +00:00
John Stiles
491282486e Reland "Add SkRuntimeBlender class."
This is a reland of 6034941cc2

Original change's description:
> Add SkRuntimeBlender class.
>
> This class is returned by SkRuntimeEffect::makeBlender when a runtime
> blend is returned. SkRuntimeBlendBuilder is also added as a convenience
> class to simplify creation and uniform setup.
>
> Our ability to add tests is limited in this CL because the SkPaint does
> not contain an SkBlender yet. We do have one test which builds an
> SkBlender, but there's not much we can do with it. Testing will be
> bulked up in the next CL.
>
> Change-Id: Ib2d7d04186690ec0d2238fc990a19d9e6b786ce3
> Bug: skia:12080
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/417006
> Commit-Queue: John Stiles <johnstiles@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

Bug: skia:12080
Change-Id: Ie41be141ba3787452f9d5c72946ebc748a5d6176
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419160
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-06-17 12:54:01 +00:00
skia-autoroll
33da72d168 Roll SwiftShader from 72e6254a135d to 84bc198202e5 (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/72e6254a135d..84bc198202e5

2021-06-16 capn@google.com Disable -warn-stack-size for LLVM older than version 12

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 jmbetancourt@google.com on the revert to ensure that a human
is aware of the problem.

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/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: jmbetancourt@google.com
Change-Id: I2e463c189a701ee2bfd5737a8e9daa52cdcaf7ff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419219
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-06-17 05:10:10 +00:00
skia-autoroll
c84c4d114e Roll ANGLE from ebf756983dd8 to f89f244d5259 (35 revisions)
ebf756983d..f89f244d52

2021-06-17 ianelliott@google.com Doc: Add component info for filing Chromium bugs
2021-06-16 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from b136d87fc6ad to 3b095d2c5438 (90 revisions)
2021-06-16 ianelliott@google.com GL: Fix bug with: Skip redundant flushes.
2021-06-16 m.maiya@samsung.com Vulkan: Avoid using VK_WHOLE_SIZE when using dynamic offsets
2021-06-16 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 2d9121fa2280 to b136d87fc6ad (70 revisions)
2021-06-16 timvp@google.com Be more specific when deleting unused third_party/ dirs
2021-06-16 syoussefi@chromium.org Vulkan: SPIR-V Gen: Support discard
2021-06-16 angle-autoroll@skia-public.iam.gserviceaccount.com Roll VK-GL-CTS from 7f2ec8531b64 to 7329723d8103 (10 revisions)
2021-06-16 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from a47f97f33178 to 2d9121fa2280 (292 revisions)
2021-06-16 syoussefi@chromium.org Vulkan: SPIR-V Gen: Fix user-defined blocks
2021-06-16 syoussefi@chromium.org Vulkan: SPIR-V Gen: Fix row-major matrices
2021-06-16 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 9559e5836cc1 to 72e6254a135d (1 revision)
2021-06-16 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from f43437ab3f52 to 734228fd0093 (5 revisions)
2021-06-16 syoussefi@chromium.org Vulkan: SPIR-V Gen: Support short-circuiting && and ||
2021-06-16 syoussefi@chromium.org Fix build
2021-06-16 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from a4467e2bcd67 to a47f97f33178 (736 revisions)
2021-06-16 syoussefi@chromium.org Translator: Generate Ops for all built-in functions
2021-06-16 syoussefi@chromium.org Vulkan: SPIR-V Gen: Unary operators
2021-06-16 syoussefi@chromium.org Vulkan: SPIR-V Gen: Handle invariant variables
2021-06-16 pkasting@chromium.org Another fix for -Wc++11-narrowing.
2021-06-15 syoussefi@chromium.org Translator: Prune trivial dead code
2021-06-15 dpranke@google.com Set gclient arg to not generate location tags.
2021-06-15 pkasting@chromium.org Fix another -Wc++11-narrowing issue.
2021-06-15 syoussefi@chromium.org Translator: Pack TSymbol and TFunction fields
2021-06-15 syoussefi@chromium.org Vulkan: SPIR-V Gen: Support mediump/lowp
2021-06-15 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 0edfab1c0897 to f43437ab3f52 (7 revisions)
2021-06-15 syoussefi@chromium.org Vulkan: Generate gl_FragColor/Data declarations in AST
2021-06-15 sugoi@google.com Vulkan: Fix accessing index buffer with uninitialized memory
2021-06-15 geofflang@google.com GL: Respect TexSubImage upload limits for robust init
2021-06-14 timvp@google.com Remove unused third_party/ deps from Android checkin
2021-06-14 timvp@google.com Rename ANGLE APK label to: com.android.angle
2021-06-14 jplate@google.com CL: Remaining functions for OpenCL 1.2
2021-06-14 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 7e098c965711 to 0edfab1c0897 (3 revisions)
2021-06-14 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 5aaab2e1ec76 to a4467e2bcd67 (434 revisions)
2021-06-11 geofflang@google.com Reland: GL: Skip redundant flushes.

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 jmbetancourt@google.com on the revert to ensure that a human
is aware of the problem.

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/master/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: jmbetancourt@google.com
Change-Id: I3b3017349ad6f831f899413ee9fda38b5d83e819
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419217
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-06-17 05:01:20 +00:00
skia-autoroll
99490c012e Roll Dawn from b03adf374711 to 5b6c1ebce7c6 (7 revisions)
https://dawn.googlesource.com/dawn.git/+log/b03adf374711..5b6c1ebce7c6

2021-06-17 yunchao.he@intel.com Enable CopySplitTests unittests for 3D texture copy splitter on D3D12
2021-06-17 yunchao.he@intel.com Fix a bug in 3D texture copy splitter for D3D12
2021-06-16 bclayton@google.com Disable test where FXC emits bad output
2021-06-16 jrprice@google.com Metal: Run vertex pulling when using Tint
2021-06-16 jrprice@google.com Metal: Remap resource bindings when using Tint
2021-06-16 hao.x.li@intel.com Implement internal storage for buffer usage and buffer binding type
2021-06-16 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 4daac0e64b34 to 944c5617caa6 (4 revisions)

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from 4daac0e64b34 to 944c5617caa6

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 alanbaker@google.com on the revert to ensure that a human
is aware of the problem.

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/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn
Bug: None
Tbr: alanbaker@google.com
Change-Id: Ib394a5da91bcb5077d729d4376f4bf6bc58c9961
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419218
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-06-17 04:54:40 +00:00
Kevin Lubick
be03ef1565 Remove ableist language
Change-Id: Ie9ef50a14906c9350adbe16720291dca944ad7fc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/418738
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2021-06-16 21:37:21 +00:00
Mike Reed
5837aad590 Expose bounds for maskfilters
Bug: skia:12094
Change-Id: Ia0dfa15fef2cd2f5fe7e024e085e56880c12224b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419098
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-06-16 21:24:30 +00:00
Brian Osman
3e4ef49890 Remove SkBlendMode from SkSL
We've lived without this for a long time. It bloats sksl_gpu (inhibits
some inlining!), and if things go according to plan, we'll be removing
enum support from SkSL entirely soon.

Change-Id: If844bbe5fdae41df7930d5c8ea9b832f9dd1b922
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419099
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-06-16 21:01:30 +00:00
John Stiles
c804b740b8 Revert "Add SkRuntimeBlender class."
This reverts commit 6034941cc2.

Reason for revert: breaking MSVC build 

Original change's description:
> Add SkRuntimeBlender class.
>
> This class is returned by SkRuntimeEffect::makeBlender when a runtime
> blend is returned. SkRuntimeBlendBuilder is also added as a convenience
> class to simplify creation and uniform setup.
>
> Our ability to add tests is limited in this CL because the SkPaint does
> not contain an SkBlender yet. We do have one test which builds an
> SkBlender, but there's not much we can do with it. Testing will be
> bulked up in the next CL.
>
> Change-Id: Ib2d7d04186690ec0d2238fc990a19d9e6b786ce3
> Bug: skia:12080
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/417006
> Commit-Queue: John Stiles <johnstiles@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

TBR=brianosman@google.com,johnstiles@google.com

Change-Id: Id916f7458b827cbfdbc951c8f02aed16e2f44935
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:12080
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419159
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-06-16 20:59:42 +00:00
John Stiles
6034941cc2 Add SkRuntimeBlender class.
This class is returned by SkRuntimeEffect::makeBlender when a runtime
blend is returned. SkRuntimeBlendBuilder is also added as a convenience
class to simplify creation and uniform setup.

Our ability to add tests is limited in this CL because the SkPaint does
not contain an SkBlender yet. We do have one test which builds an
SkBlender, but there's not much we can do with it. Testing will be
bulked up in the next CL.

Change-Id: Ib2d7d04186690ec0d2238fc990a19d9e6b786ce3
Bug: skia:12080
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/417006
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-06-16 20:34:50 +00:00
Jorge Betancourt
cfa4774f9a [androidkit] expose SkPath to androidkit
Change-Id: Ibc871459234ba72b0ab948c601e0895c15e21126
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/415797
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-06-16 20:23:20 +00:00
Kevin Lubick
4ce6f1393c [infra] Update wasm_gold_aggregator
Change-Id: I987712694580ae8636089b4dc58f8a3595a86577
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419097
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2021-06-16 20:14:40 +00:00
Chris Dalton
2e2488c813 Call test.modifyGrContextOptions() in wasm tests
Change-Id: Ie6b641d1df7040f5a13fb654b83c90c5e07e0171
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419116
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Auto-Submit: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2021-06-16 19:59:51 +00:00
Chris Dalton
e8f6663287 Disable tessellation instead of CCPR in GrClipStack_SWMask
Change-Id: Ide987cebc40e7175d581c96977eea6acd76b5cff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419076
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-06-16 18:49:10 +00:00
John Stiles
8f9f763ec5 Remove unreferenced TODO function.
Change-Id: I2de7d90504c2030f9d2ce2694899d350362ebb5c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419056
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-06-16 18:45:18 +00:00
John Stiles
9300391a77 Add Make functions for runtime blends.
This does basic plumbing work, but lacks a real implementation for the
custom blend subclass. That subclass is added in the followup CL of this
CL chain.

Change-Id: I8db0eb42737a739b49741ffd6f4a283a2c0a9d62
Bug: skia:12080
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/417005
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-06-16 18:19:57 +00:00