Commit Graph

55208 Commits

Author SHA1 Message Date
John Stiles
a91bf055ea Add support for matrix-scalar operations in SPIR-V.
Multiplication is handled just as before. Ops other than multiplication
are handled by splatting the scalar into a matrix, then performing the
op as a componentwise matrix-op-matrix binary expression.

Change-Id: I654715c45bf5c91b8e9660fdf1c1c6d6818b621a
Bug: skia:11985
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408637
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-05-17 14:19:10 +00:00
Kevin Lubick
ed0c0ed028 [canvaskit] Add initial implementation of generating TS
This adds some initial features for generating the ambient
namespace files (the TS equivalent of .h files) for the
C++ binding files. There are a few tests and it works on
the sample code in tskit.

I split the bindings/ folder into bindings/ and interface/
(for C++ and TS code, respectively).

This can be tested locally by running
make generate && make debug && make serve
and verifying that everything compiles and runs in the browser.

One thing I changed for easier parsing was making a @type
annotation required, with an @optional tag for making a field
or constant optional.

Change-Id: If9c5a664e84fac4c734277cddd7774989a1f7bf8
Bug: skia:11826
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407476
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
2021-05-17 13:56:31 +00:00
John Stiles
ab3e6394a0 Re-enable the nonsquare matrix test.
The mat4x2 portion of the test no longer checks its results, as there
are bugs in the Intel and Radeon GPU drivers that prevent mat4x2s
from being constructed properly.

The SkSL optimizer ends up eliminating the 4x2 matrix entirely because
it is unused by the rest of the code, as well at the 4x4 matrix which is
calculated from the 4x2. At this point, I'm OK with this.

Change-Id: If1464f9e4938b0a37b2ec180c686972389d94e83
Bug: skia:12003
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408900
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-05-17 13:27:48 +00:00
Dominik Röttsches
2da029b28f [COLRv1] Map linear gradient extrema to [0, 1] range
Prepare data to Skia's linear gradient shader so that the extrema are
[0, 1] when the data in the font does not have them at these
positions. This is required for the shader to correctly compute repeat
modes.

Add the test font from the Google color fonts repo [1] with stops at [0,
1], [0.2, 0.8], [0, 1.5], [0.5, 1.5] respectively, compare[2].

[1] https://github.com/googlefonts/color-fonts/blob/main/fonts/more_samples-glyf_colr_1.ttf
[2] https://github.com/googlefonts/colr-gradients-spec/issues/281#issuecomment-828346428

Bug: skia:11922
Change-Id: Ic62a26911fa177af35ca16f183b5985d884237a5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405717
Commit-Queue: Dominik Röttsches <drott@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2021-05-17 12:24:37 +00:00
Jim Van Verth
d2567de8bb Fix Metal MSAA in Viewer.
Sets the sample count so we create the MSAA color buffer, and
sets the manual MSAA resolve flag for the created rendertarget.

Change-Id: I577bc619ce0ce8490704135c72139ad7a05904e4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407818
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2021-05-17 11:15:57 +00:00
skia-autoroll
9c2769ec11 Roll Chromium from 5bc0d1561110 to ecbf59478cb7 (935 revisions)
5bc0d15611..ecbf59478c

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 bsalomon@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: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: bsalomon@google.com
Change-Id: Icae10d6ecd7175a5ac2b0b32f083421a49911ad6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/409103
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-05-17 08:35:15 +00:00
skia-autoroll
d22a70be4f Roll ANGLE from bf4aa6c468db to 3d082a102d72 (4 revisions)
bf4aa6c468..3d082a102d

2021-05-15 cclao@google.com Vulkan: Add webgl conformance/texture-size test
2021-05-15 ianelliott@google.com Vulkan: Fix AGI hierarchy
2021-05-15 cclao@google.com Skip Texture2DArrayIntegerTestES3.NonZeroBaseLevel on OSX+OpenGL
2021-05-15 syoussefi@chromium.org Vulkan: Disable BufferVk suballocation

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 bsalomon@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: bsalomon@google.com
Change-Id: Ibd066f85e9d189addd589a064929a1a04836ca65
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/409097
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-05-17 05:22:45 +00:00
skia-autoroll
f91ce02013 Roll SK Tool from bdc889bc194c to 1a8ff8585fce
https://skia.googlesource.com/buildbot.git/+log/bdc889bc194c..1a8ff8585fce

2021-05-16 skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com Update CIPD Packages
2021-05-13 lovisolo@google.com [page object] Refactor API to remove most nested awaits in client code.
2021-05-13 lovisolo@google.com [page object] Rename select{One,All}POE methods to bySelector / bySelectorAll.
2021-05-13 lovisolo@google.com [page object] Remove unused select{One,All}POEThen* methods.

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 lovisolo@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

Tbr: lovisolo@google.com
Change-Id: I3450a68025bf076c699ed1d8cd5e1e03efd8528d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408980
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-05-16 06:49:54 +00:00
Mike Reed
bc7c754ce3 Expose glyphIntercepts to CK
bug: skia:12000
Change-Id: I40f130b0eab21ef4a53ee88eed8f62c4f3a577c1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408899
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Yegor Jbanov <yjbanov@google.com>
2021-05-15 15:30:50 +00:00
skia-autoroll
bc8e0d8ba0 Roll ANGLE from 83689e32eef4 to bf4aa6c468db (11 revisions)
83689e32ee..bf4aa6c468

2021-05-14 angle-autoroll@skia-public.iam.gserviceaccount.com Roll VK-GL-CTS from 1c4a387382ea to 535dfe49fc49 (1 revision)
2021-05-14 geofflang@google.com GL: Recreate textures on eglReleaseTexImage.
2021-05-14 m.maiya@samsung.com Bug fix in glTexParameter and glGetTexParameter validation
2021-05-14 cclao@google.com Fix IOSurfaceClientBufferTest.RenderToBGRX8888IOSurface on OSX+OpenGL
2021-05-14 jmadill@chromium.org Test Runner: Add test expectations parser.
2021-05-14 jonahr@google.com Reland Change to module directory when loading swiftshader ICD.
2021-05-14 sergeyu@google.com [Vulkan] Add DisplayVkNull
2021-05-14 angle-autoroll@skia-public.iam.gserviceaccount.com Roll VK-GL-CTS from 6498f4042d9f to 1c4a387382ea (19 revisions)
2021-05-14 cnorthrop@google.com Tests: Update capture_replay_expectations
2021-05-14 cclao@google.com Vulkan: Add feature flag to flush at framebuffer boundary
2021-05-14 lubosz.sarnecki@collabora.com TracePerfTests: Don't call framebuffer functions on GLES1.

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

To 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: robertphillips@google.com
Test: Test: dEQP.KHR_GLES31/core_texture_border_clamp_texparameteri_errors
Change-Id: I8d3587eb0d1215838795964eb106c787cdd83f91
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408873
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-05-15 00:47:13 +00:00
Chris Dalton
df2dbad1a8 Reland "Reland "Reland "Use conics with w=Inf to describe triangles for the tessellator"""
This is a reland of 99e6f0fcfb

Original change's description:
> Reland "Reland "Use conics with w=Inf to describe triangles for the tessellator""
>
> This is a reland of ff515df5b4
>
> Original change's description:
> > Reland "Use conics with w=Inf to describe triangles for the tessellator"
> >
> > This is a reland of 84f70136ab
> >
> > Original change's description:
> > > Use conics with w=Inf to describe triangles for the tessellator
> > >
> > > Previously, only the indirect tessellator could draw triangles, and
> > > only with special index data. Using conics with w=Inf will allow us to
> > > draw triangles with the hardware tessellator as well, in addition to
> > > being able to wean the indirect tessellator off an index buffer.
> > >
> > > Bug: skia:10419
> > > Bug: chromium:1202607
> > > Change-Id: I180af9cb5410c0e0bb25a2edcfb01e17d4a2f590
> > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/406977
> > > Commit-Queue: Chris Dalton <csmartdalton@google.com>
> > > Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> >
> > Bug: skia:10419
> > Bug: chromium:1202607
> > Change-Id: Ic12b10eaa60fddd212c66757bf7100749ee58d49
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408096
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > Commit-Queue: Chris Dalton <csmartdalton@google.com>
>
> TBR=robertphillips@google.com
>
> Bug: skia:10419
> Bug: chromium:1202607
> Change-Id: Id1f8dfa133f446b9f30f2bf8493a3a7b99072e59
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408616
> Reviewed-by: Chris Dalton <csmartdalton@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

Bug: skia:10419
Bug: chromium:1202607
Change-Id: Iadc60aae395146d5da5bfaa725b980c963e6bead
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408817
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-05-14 23:52:53 +00:00
Chris Dalton
0638df13a3 Cull tessellated strokes that don't intersect the viewport
When a stroke is zoomed in, it can require an exponential number of
chops. This CL updates the tessellators to stop recursing once a curve
is no longer in the viewport.

Bug: skia:10419
Bug: skia:11268
Bug: skia:9795
Change-Id: I6aad5355618462e88ce6ccccb57c500ae6310f22
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408576
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2021-05-14 23:03:53 +00:00
skia-autoroll
5a87b80360 Roll SwiftShader from c4d054c6ad41 to af907708adb3 (2 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/c4d054c6ad41..af907708adb3

2021-05-14 capn@google.com Unpoison Reactor Call() arguments when MSan instrumentation is disabled
2021-05-14 capn@google.com Update Vulkan headers to version 1.2.178

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

To 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: robertphillips@google.com
Change-Id: I11dd32ccf03b23f5bf646eb3a2c932c30fac0b0d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408725
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-05-14 21:55:43 +00:00
Chris Dalton
8731a71660 Convert GrPathIndirectTessellator to use GrVertexWriter
Bug: skia:10419
Change-Id: I061c216e6f49399e533fb9a83ba5d9f9d3af83e3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408858
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-05-14 21:51:52 +00:00
John Stiles
024f41828b Disable nonsquare matrix test temporarily.
This test causes issues on a handful of drivers still.

Change-Id: I7dd0df95d174c53cfc05df83d848a90a169ba3d1
Bug: skia:12003
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408897
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-05-14 21:44:11 +00:00
Greg Daniel
fe788f9cd2 Revert "Round up DMSAA attachments to pow2 if supported."
This reverts commit c3e8a7eeb6.

Reason for revert: breaks dmsaa clip_shader_persp and complexclip4_aa

Original change's description:
> Round up DMSAA attachments to pow2 if supported.
>
> Change-Id: I03f5ea649209b9894753c981872edbd7d718288c
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408643
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

Change-Id: I3ff0931d7d00b064b5721a2593d2e9865e8edebc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408896
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-05-14 20:47:14 +00:00
John Stiles
259553c942 Perform basic pass-fail checks in MatricesNonsquare.
Previously, it was structured like Matrices.sksl and had no verification
of its results. Now it double-checks that its outputs match our
expectations. The test is still quite simple for now, however.

Change-Id: Iaa45fe58beb497a63801833f8ba5a493a61139d9
Bug: skia:11985, skia:12003
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408646
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-05-14 19:39:43 +00:00
Chris Dalton
536b749882 Revert "Reland "Reland "Use conics with w=Inf to describe triangles for the tessellator"""
This reverts commit 99e6f0fcfb.

Reason for revert: Perf regressions

Original change's description:
> Reland "Reland "Use conics with w=Inf to describe triangles for the tessellator""
>
> This is a reland of ff515df5b4
>
> Original change's description:
> > Reland "Use conics with w=Inf to describe triangles for the tessellator"
> >
> > This is a reland of 84f70136ab
> >
> > Original change's description:
> > > Use conics with w=Inf to describe triangles for the tessellator
> > >
> > > Previously, only the indirect tessellator could draw triangles, and
> > > only with special index data. Using conics with w=Inf will allow us to
> > > draw triangles with the hardware tessellator as well, in addition to
> > > being able to wean the indirect tessellator off an index buffer.
> > >
> > > Bug: skia:10419
> > > Bug: chromium:1202607
> > > Change-Id: I180af9cb5410c0e0bb25a2edcfb01e17d4a2f590
> > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/406977
> > > Commit-Queue: Chris Dalton <csmartdalton@google.com>
> > > Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> >
> > Bug: skia:10419
> > Bug: chromium:1202607
> > Change-Id: Ic12b10eaa60fddd212c66757bf7100749ee58d49
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408096
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > Commit-Queue: Chris Dalton <csmartdalton@google.com>
>
> TBR=robertphillips@google.com
>
> Bug: skia:10419
> Bug: chromium:1202607
> Change-Id: Id1f8dfa133f446b9f30f2bf8493a3a7b99072e59
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408616
> Reviewed-by: Chris Dalton <csmartdalton@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

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

Change-Id: I8a4c85bc6863fbe62ed34dc3110370662bacab67
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10419
Bug: chromium:1202607
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408677
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-05-14 18:48:44 +00:00
Greg Daniel
c3e8a7eeb6 Round up DMSAA attachments to pow2 if supported.
Change-Id: I03f5ea649209b9894753c981872edbd7d718288c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408643
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-05-14 18:21:43 +00:00
John Stiles
aecf8d5171 Expose non-square matrix types when fEnforceES2Restrictions is off.
This will allow us to write tests that verify the behavior of non-square
matrix ops.

Change-Id: I1490c4675778cbdc8428ac7a6c9de16083179fc8
Bug: skia:11985
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408645
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-05-14 16:50:42 +00:00
skia-autoroll
bd816d3c52 Roll ANGLE from 39ee36406c7b to 83689e32eef4 (3 revisions)
39ee36406c..83689e32ee

2021-05-14 jplate@google.com CL: Add symbol version map to libOpenCL
2021-05-14 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from b0687cb1f1ec to 3b747dab7bb3 (328 revisions)
2021-05-14 jplate@google.com CL: Implement context for front end and passthrough

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

To 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: robertphillips@google.com
Change-Id: I07dda342be8f195fc1fb38b96560475e463e4d46
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408798
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-05-14 15:11:52 +00:00
Mike Reed
81e2f9355b Expose intercepts on SkFont
Already exposed (on TextBlob), so this makes it available for clients
that may use drawGlyphs directly. (including canvaskit/flutter)

Change-Id: I8b4bd51e13827dc3970d5a6d06f0e0d3031af13c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408638
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-05-14 14:50:42 +00:00
Robert Phillips
c650cc05f8 Revert "Vectorize scalars in SPIR-V using ConstructorSplat."
This reverts commit 5d61cc2f87.

Reason for revert: break Vk bots

Original change's description:
> Vectorize scalars in SPIR-V using ConstructorSplat.
>
> This avoids redundant code, and has a small side benefit of
> deduplicating constant vectors which appear more than once in the code,
> since `writeConstructorSplat` already supports this.
>
> Change-Id: I2972ee922ac92adeb40bc765da3b490a59b957b3
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408360
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>

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

Change-Id: I9fc0b896c0cfccc348d510a02df47d5ad74a0e90
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408644
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-05-14 14:29:33 +00:00
Florin Malita
16eead830a [skottie] Clamp OpacityEffect values
Animated opacities can yield values > 1, which trigger RenderContext
asserts.

Clamp explicitly to avoid this issue.  Also avoid allocating a new
RenderContext when the value is >= 1 (no op).

TBR=
Change-Id: I1639af7ab50f4ccf9cd79cb950f14b64dd2619ba
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408256
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2021-05-14 14:19:22 +00:00
Brian Osman
6f520cd120 Enable vertex ID support on Metal
This allows the tessellated stroke renderer to run on Metal.

Change-Id: Ia6bd4008a3310cd316abdc2715efcec3916c6bfa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408358
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-05-14 13:52:23 +00:00
John Stiles
82491c5d65 Enable proper testing of const arrays.
This test was generating invalid code in Metal
(http://review.skia.org/408356), but we didn't catch it because the code
wasn't actually being run.

Change-Id: I649034593a566f9e835b1cf7b0702c64952d31ef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408641
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-05-14 13:37:12 +00:00
John Stiles
6831635373 Cleanup TODO for constant-expression handling.
Support for constant-expression function calls in SkSL now exists, and
support for abs() was added at http://review.skia.org/405676.

Change-Id: I3144af993db93a3d640971734d4cb03e0cfb8589
Bug: skia:10835
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408642
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-05-14 13:36:33 +00:00
Chris Dalton
18d4964a4b Fix inflation radii of tessellated hairlines
Bug: skia:8157
Change-Id: Ia7b0087febcf8e6ad3e9a0b32fc1ff372ae6f1c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408556
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-05-14 13:10:42 +00:00
John Stiles
43b593cbdc Cleanup writeComponentwiseMatrixBinary implementation.
The previous version took integer SpvOps, but GLSL and SkSL have no
support for integer matrices, so this was unnecessary. Also, hand-rolled
SpvOpCompositeConstruct generation has been replaced with an equivalent
call to `writeComposite`.

Change-Id: I4992bab80cc563acef49b5047b5ab39fd5840c1e
Bug: skia:11985
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408636
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-05-14 13:02:42 +00:00
John Stiles
5d61cc2f87 Vectorize scalars in SPIR-V using ConstructorSplat.
This avoids redundant code, and has a small side benefit of
deduplicating constant vectors which appear more than once in the code,
since `writeConstructorSplat` already supports this.

Change-Id: I2972ee922ac92adeb40bc765da3b490a59b957b3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408360
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-05-14 13:01:02 +00:00
John Stiles
29b44fc226 Add SPIR-V test for matrix-op-scalar math.
This is a clone of the Metal test. (This can be moved into shared/ and
enabled as a real test once the codegen is fixed.)

At present, this test generates broken code; everything is writing an
SpvOpMatrixTimesScalar opcode regardless of the actual operation being
performed.

Change-Id: If06b4196e7d9be36e41c5c60c006b2a713cc25d8
Bug: skia:11985
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408297
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-05-14 12:52:02 +00:00
skia-autoroll
6b49c59085 Roll ANGLE from c5e344b1e676 to 39ee36406c7b (3 revisions)
c5e344b1e6..39ee36406c

2021-05-13 syoussefi@chromium.org Translator: Fix struct/uniform separation w.r.t to arrays
2021-05-13 ianelliott@google.com Disable GL_EXT_shader_framebuffer_fetch_non_coherent on Arm/QCOM
2021-05-13 jmadill@chromium.org Allow specifying GPU config on expectation check.

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

To 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: robertphillips@google.com
Change-Id: I417e3c5d84c12dfe2ec26be600d2ea8f87c6f24e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408657
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-05-14 05:00:52 +00:00
Chris Dalton
99e6f0fcfb Reland "Reland "Use conics with w=Inf to describe triangles for the tessellator""
This is a reland of ff515df5b4

Original change's description:
> Reland "Use conics with w=Inf to describe triangles for the tessellator"
>
> This is a reland of 84f70136ab
>
> Original change's description:
> > Use conics with w=Inf to describe triangles for the tessellator
> >
> > Previously, only the indirect tessellator could draw triangles, and
> > only with special index data. Using conics with w=Inf will allow us to
> > draw triangles with the hardware tessellator as well, in addition to
> > being able to wean the indirect tessellator off an index buffer.
> >
> > Bug: skia:10419
> > Bug: chromium:1202607
> > Change-Id: I180af9cb5410c0e0bb25a2edcfb01e17d4a2f590
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/406977
> > Commit-Queue: Chris Dalton <csmartdalton@google.com>
> > Reviewed-by: Michael Ludwig <michaelludwig@google.com>
>
> Bug: skia:10419
> Bug: chromium:1202607
> Change-Id: Ic12b10eaa60fddd212c66757bf7100749ee58d49
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408096
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

TBR=robertphillips@google.com

Bug: skia:10419
Bug: chromium:1202607
Change-Id: Id1f8dfa133f446b9f30f2bf8493a3a7b99072e59
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408616
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-05-14 04:32:11 +00:00
Robert Phillips
cad48c6868 Revert "Reland "Use conics with w=Inf to describe triangles for the tessellator""
This reverts commit ff515df5b4.

Reason for revert: May be blocking Chrome roll

Original change's description:
> Reland "Use conics with w=Inf to describe triangles for the tessellator"
>
> This is a reland of 84f70136ab
>
> Original change's description:
> > Use conics with w=Inf to describe triangles for the tessellator
> >
> > Previously, only the indirect tessellator could draw triangles, and
> > only with special index data. Using conics with w=Inf will allow us to
> > draw triangles with the hardware tessellator as well, in addition to
> > being able to wean the indirect tessellator off an index buffer.
> >
> > Bug: skia:10419
> > Bug: chromium:1202607
> > Change-Id: I180af9cb5410c0e0bb25a2edcfb01e17d4a2f590
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/406977
> > Commit-Queue: Chris Dalton <csmartdalton@google.com>
> > Reviewed-by: Michael Ludwig <michaelludwig@google.com>
>
> Bug: skia:10419
> Bug: chromium:1202607
> Change-Id: Ic12b10eaa60fddd212c66757bf7100749ee58d49
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408096
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

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

Change-Id: I4f4ca646ea859386750f4f1e75dcf4364159b191
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10419
Bug: chromium:1202607
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408497
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-05-13 22:29:21 +00:00
Robert Phillips
6e35474c93 Revert "Reland "Delete the index buffer from middle-out tessellation""
This reverts commit 0c2ee32f4c.

Reason for revert: Blocking revert of a CL that is probably blocking the Chrome roll

Original change's description:
> Reland "Delete the index buffer from middle-out tessellation"
>
> This is a reland of 0d0b1b3b56
>
> Original change's description:
> > Delete the index buffer from middle-out tessellation
> >
> > This gives us more flexibility for customizing triangulations in
> > future modes. It is also hopefully cheaper than the extra memory
> > indirection from indexed draws.
> >
> > Bug: skia:10419
> > Bug: chromium:1202607
> > Change-Id: Iba41a35a634edf8f962c3d604c7e035e7a85801d
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407296
> > Commit-Queue: Chris Dalton <csmartdalton@google.com>
> > Reviewed-by: Greg Daniel <egdaniel@google.com>
>
> Bug: skia:10419
> Bug: chromium:1202607
> Change-Id: I2f5022d2122dee1ca197780b534663b37cd2504f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408236
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

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

Change-Id: Ic00aa7e26f9f24bc90ccb65c9cc3af49e1aac0a4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10419
Bug: chromium:1202607
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408496
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-05-13 22:28:02 +00:00
Brian Osman
3193a04b09 Handle null vertex buffers in Metal
When using instanced rendering, we sometimes bind a null vertex
buffer. Make sure not to crash during the deferred bind.

Change-Id: Ia0351222a220c2ac947de52e9d6eb76146dd64b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408357
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-05-13 21:52:51 +00:00
skia-autoroll
1a183bc90d Roll ANGLE from 9809122dbd0d to c5e344b1e676 (9 revisions)
9809122dbd..c5e344b1e6

2021-05-13 syoussefi@chromium.org Translator: Fix local var inits vs struct/uniform separation
2021-05-13 gert.wollny@collabora.com Capture/Replay: recreate the EGL window if contexts don't match
2021-05-13 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 3fb708290557 to b0687cb1f1ec (639 revisions)
2021-05-13 geofflang@chromium.org Add messages for framebuffer completeness errors.
2021-05-13 syoussefi@chromium.org Vulkan: Allow DynamicBuffer suballocation in BufferVk
2021-05-13 syoussefi@chromium.org Remove teglAndroidUtil.cpp override
2021-05-13 jmadill@chromium.org Test Runner: Fixes to skipped tests.
2021-05-13 jplate@google.com CL: device partitioning for front end and passthrough
2021-05-13 sugoi@google.com Add array bounds checks for WebGL shaders

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

To 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: robertphillips@google.com
Change-Id: If277a532e60b5e9c5fedf5b947d324d304962e41
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408002
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-05-13 21:15:40 +00:00
Brian Osman
58134e1408 Fix const globals in Metal
We were emitting this at global scope (not in Globals). That would lead
to errors about the variable needing to be in the constant address
space. (You can see the result in ConstArray.metal - the old code was
invalid). Also, we were already making references use _globals, so the
code was double-wrong (or half-right, depending on your perspective).

After the core change, writeVarDeclaration was only used for local
scope, and writeModifiers never used the 'globalContext' parameter.

The removal of finishLine() changed every test output, unfortunately.

Change-Id: Icc1356ba2cc3c339b2f5759b3d18523fd39395bc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408356
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-05-13 21:11:10 +00:00
Chris Dalton
0c2ee32f4c Reland "Delete the index buffer from middle-out tessellation"
This is a reland of 0d0b1b3b56

Original change's description:
> Delete the index buffer from middle-out tessellation
>
> This gives us more flexibility for customizing triangulations in
> future modes. It is also hopefully cheaper than the extra memory
> indirection from indexed draws.
>
> Bug: skia:10419
> Bug: chromium:1202607
> Change-Id: Iba41a35a634edf8f962c3d604c7e035e7a85801d
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407296
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

Bug: skia:10419
Bug: chromium:1202607
Change-Id: I2f5022d2122dee1ca197780b534663b37cd2504f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408236
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-05-13 20:54:30 +00:00
Herb Derby
1264001c8c Use shared lock for charsToGlyphs
onCharsToGlyphs show a lot of contention on the exclusive lock.
See:
https://pprof.corp.google.com/user-profile?id=efff7e7bde54d93f4351cd7adabbcbbd&tab=graph

Make the optimistic conversion use a shared lock, and only
move to an exclusive lock if chars are missing.

Bug: b/182395513

Change-Id: Idcb54687aec12a1aeb710c591d1cc5a5bad66682
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408336
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2021-05-13 20:49:20 +00:00
Florin Malita
4c0da73206 [skottie] Text fill/stroke opacity animators
Implement support for fill and stroke opacity animators.

TBR=reed
Bug: skia:11966
Change-Id: I206c949d0fc685c63043e672f16e9c1ac35a6d53
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405397
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Florin Malita <fmalita@google.com>
2021-05-13 20:03:52 +00:00
Greg Daniel
6610bedc2e Share DMSAA attachments in GL between render targets.
Change-Id: Iaad578d43e2b686079b68b1d43337e3fc7c5b4ff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408176
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-05-13 19:42:58 +00:00
Herb Derby
82fdab48ab reject sizes that will overflow in SkSpan
Change-Id: Ie1eac40fe678529410f3ae4ab0cc7460dedfa4c2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408296
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2021-05-13 19:42:43 +00:00
Michael Ludwig
6529990763 Fix overdraw from unstable perspective math
There were two issues leading to the corruption seen in the linked
chromium issue.

1. The draw's bounds were calculated based on the quad being clipped
to w>= epsilon, which is what happens when the AA inset/outset is done.
But for non-aa quads, the fillrect and texture ops did no clipping,
assuming that the GPU would be sufficient. However, this can produce
non-aa draws that exceed the calculated bounds, misleading the clip
stack into incorrectly removing the scissor, etc.
2. Precision issues within CropToRect meant some perspective quads'
barycentric coordinates would become degenerate and compute to (0,0,1),
making it appear as if the render target/scissor were contained within
it. This meant we'd turn it into a rectangular clear.

These changes appear to address the corruption on Linux and Windows, but
there are still rendering artifacts from poor aa inset/outset
calculations. These artifacts are at least limited to the clip properly.
A better rendering method that does not rely on line intersections
will address these artifacts, but this CL is a reasonable temporary
mitigation.

Bug: chromium:1204347
Change-Id: I3c67d4efe70313ae7c98abc0a57b5b047c83890d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407821
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2021-05-13 19:37:53 +00:00
Jorge Betancourt
025b914468 [androidkit] add getter for matrices
Change-Id: I0fd42b2506d794622852bd55aa4e8c2545216312
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407916
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-05-13 19:29:53 +00:00
John Stiles
c985e149ea Add support for matrix division to Metal codegen.
This CL adds a polyfill for componentwise matrix/matrix division to
Metal, as well as matrix/=matrix. Matrix/scalar and scalar/matrix
division work by splatting the scalar out to a matrix (handled in the
prior CL, http://review.skia.org/407616) and then performing
componentwise matrix/matrix division.

Working demonstration (copy-pasted from the Metal output file):
http://screen/BrqyPcbPrB7Dy4m

Change-Id: I6a8b97783be3485f7ffee551b669d14bc58e7568
Bug: skia:11125
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407796
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-05-13 19:28:53 +00:00
John Stiles
7cbe66b334 Cleanup operator conversion from assignment to non-assignment form.
We don't need to do string manipulation to turn `+=` into `+`. We can
make the same conversion via `op.removeAssignment()`.

Change-Id: I036ad314c161af45624efecde944bb0e596c1abd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407816
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-05-13 17:40:13 +00:00
Chris Dalton
0cfe5e1628 Add a GrCullTest class
GrCullTest quickly determines whether a set of points will be visible
or not. It will be used to guard against exponential recursion when
chopping paths at an extreme zoom level.

Bug: skia:10419
Change-Id: I85183826d820bbca0349a1e794b0696f776b134b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407297
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2021-05-13 17:30:58 +00:00
John Stiles
154bd1f522 Avoid repeated failure messages in the dm logs.
Successful dm runs on Windows currently include this message many
thousands of times over. This pollutes the logs for no benefit.

Change-Id: I127b4588ed25d8f51ac70d0f87645bd9c28cec5a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408057
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-05-13 17:27:45 +00:00
John Stiles
465da15b16 Reland "The Matrices test now verifies its results."
This reverts commit 90508f02dc.

Reason for revert: avoiding driver bugs this time

Original change's description:
> Revert "The Matrices test now verifies its results."
>
> This reverts commit 86121f6c0e.
>
> Reason for revert: tree sad
>
> Original change's description:
> > The Matrices test now verifies its results.
> >
> > Previously, this test did a bunch of matrix math but never actually
> > checked its results for correctness.
> >
> > Change-Id: I353be58049286266c2d561b0939b3874d2684403
> > Bug: skia:11985
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407360
> > 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>
>
> TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com
>
> Change-Id: I1335f01c14ee955426e02efaa3c30421cd41aa34
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:11985
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407617
> Reviewed-by: John Stiles <johnstiles@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>

Bug: skia:11985
Change-Id: I214375d74977f324973da72c440d7ff5ff179016
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408157
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-05-13 17:25:53 +00:00