Commit Graph

55377 Commits

Author SHA1 Message Date
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
John Stiles
6b13129c30 Add support for matrix + scalar to Metal codegen.
The Metal code generator will now detect matrix-op-scalar expressions
and splat the scalar across a matrix. This allows a scalar to be added
to, or subtracted from, a matrix. (It does not fix division because
Metal also does not natively support componentwise division on
matrices.)

Change-Id: I7d5b0c5bd35393475c524e34cad789bf4f72a103
Bug: skia:11125
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407616
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:22:43 +00:00
Jorge Betancourt
e3f8030494 [androidkit] implement ThreadedSurface backed by WindowSurface
This moves ownership of the SkSurface to ThreadedSurface::fWindowSurface.

When we pass a Message to the SurfaceThread, we will include  a pointer to ThreadedSurface.fWindowSurface so we can call:
getCanvas() to draw the SkPicture
WindowSurface's constructor so it can hold the WindowContext made during the init

To reference WindowSurface in SurfaceThread, we need to make a header for Surface.cpp (added in this cl)

Change-Id: I8c67223eee301a1b6e0d05934e1f8597cf70bc64
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404918
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-05-13 17:15:49 +00:00
Chris Dalton
ff515df5b4 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>
2021-05-13 17:15:48 +00:00
skia-autoroll
3cbba1a848 Roll ANGLE from 25b53ceb65b7 to 9809122dbd0d (1 revision)
25b53ceb65..9809122dbd

2021-05-13 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from be169ef35238 to c4d054c6ad41 (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 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: I316a4489d47a794409bfa8e765a486ee362f98bb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408077
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 17:10:45 +00:00
Brian Osman
43ee3f5930 Fix implicit signedness change warnings in private includes
Both SkColorData.h and SkNx_sse.h are in include/private, but not
(currently) included by any public headers. Adding them to a public
header reveals warnings about implicit conversion changing signedness
(-Wsign-conversion), enforced in our public headers warnings check.

Bug: skia:11995
Change-Id: Iee44b24a6df031431113e2d25e42f0a8dd55a5c0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408056
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2021-05-13 17:10:44 +00:00
Brian Salomon
d977fdecc6 Re-disable indirect draw on ANGLE D3D
Bug: skia:11998
Change-Id: I55520747088feeb5c554179a91adff152a2c5b64
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408116
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2021-05-13 15:49:39 +00:00
Brian Salomon
ca9f6a8550 limit transfer buffer workaround to angle d3d backend
Tested that this works ok on GL backend of ANGLE.

Change-Id: I517523e03d49b3bc85abdda31ee427d708db0c7b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407817
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2021-05-13 13:32:33 +00:00
Robert Phillips
c7dd6f451f Revert "Use conics with w=Inf to describe triangles for the tessellator"
This reverts commit 84f70136ab.

Reason for revert: Checking if this is blocking the Chrome roll

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>

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

Change-Id: If2e460ff630103405c628da0c3273896ef89e4b5
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/+/408018
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-05-13 13:06:04 +00:00
Robert Phillips
9db2098917 Revert "Delete the index buffer from middle-out tessellation"
This reverts commit 0d0b1b3b56.

Reason for revert: Blocking revert of "Use conics with w=Inf to describe triangles for the tessellator"

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>

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

Change-Id: I2ee198c7b68683e0f14c5ce2a29dd74ac0032028
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/+/408017
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-05-13 13:04:45 +00:00
skia-autoroll
6b719c25ca Roll Chromium from 51f0f14b5681 to 5bc0d1561110 (555 revisions)
51f0f14b56..5bc0d15611

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 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: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: robertphillips@google.com
Change-Id: Ia4acdd135e9897cb8722460568b21001e2b1b5aa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407767
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 05:39:33 +00:00
skia-autoroll
f9362ef0dc Roll Dawn from f0fdfa0d61df to c2a281862153 (5 revisions)
https://dawn.googlesource.com/dawn.git/+log/f0fdfa0d61df..c2a281862153

2021-05-13 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 884a4e2172ef to 9b1ee6bdeafd (2 revisions)
2021-05-13 jiajia.qin@intel.com Add MatMul with 2-dimensional shared array shader
2021-05-12 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 3103a1f666f8 to 884a4e2172ef (3 revisions)
2021-05-12 enga@chromium.org Pass mayCollide argument to Tint's BindingRemapper
2021-05-12 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 9fdfa1e32374 to 3103a1f666f8 (39 revisions)

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from 9fdfa1e32374 to 9b1ee6bdeafd

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 kainino@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: kainino@google.com
Change-Id: If3c606ad79bbf495996e8ccee055c05a104d2a02
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407769
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 05:13:03 +00:00
skia-autoroll
1648dede8b Roll SwiftShader from be169ef35238 to c4d054c6ad41 (2 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/be169ef35238..c4d054c6ad41

2021-05-12 capn@google.com Work around MemorySanitizer scalar SSE false positives
2021-05-12 capn@google.com Work around MemorySanitizer movmsk false positives

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: Ib1b43d7220c59a8eac06f472a2f33c6c66bd2c0e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407768
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 05:03:23 +00:00
Michael Ludwig
537b750834 Fix bit shift overflow making bots sad
TBR=robertphillips@google.com
Change-Id: I8dee1a3c804bd7966e79da9d60ba1659f57525ee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407822
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2021-05-12 23:22:03 +00:00
skia-autoroll
66441d4ea0 Roll ANGLE from 930db294639d to 25b53ceb65b7 (18 revisions)
930db29463..25b53ceb65

2021-05-12 gert.wollny@collabora.com Revert "Change to module directory when loading swiftshader ICD."
2021-05-12 jmadill@chromium.org Test Runner: Handle skipped gtests.
2021-05-12 lubosz.sarnecki@collabora.com Tests: Add Dr. Driving trace.
2021-05-12 lubosz.sarnecki@collabora.com FrameCapture: Use gl*Separate functions only when required.
2021-05-12 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from dcb33711bd4b to be169ef35238 (1 revision)
2021-05-12 lubosz.sarnecki@collabora.com Tests: Add Summoners War trace.
2021-05-12 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from fff9d6fb8ddf to 3fb708290557 (495 revisions)
2021-05-12 angle-autoroll@skia-public.iam.gserviceaccount.com Roll VK-GL-CTS from dab93ea8f88c to 6498f4042d9f (9 revisions)
2021-05-11 ynovikov@chromium.org Follow up on Vulkan headers update to 1.2.177
2021-05-11 jplate@google.com Refactor CL platform object
2021-05-11 jplate@google.com Implement CL device object for front end and passthrough
2021-05-11 j.vigil@samsung.com EGL: setup extension EGL_EXT_protected_content
2021-05-11 jmadill@chromium.org infra: Switch Android ARM64 bots to compile-and-test.
2021-05-11 lubosz.sarnecki@collabora.com FrameCapture: Capture GLES1 specific states.
2021-05-11 cclao@google.com Vulkan: set DS layout before using it in the endRenderPass
2021-05-11 jmadill@chromium.org infra: Remove old TODO.
2021-05-11 timvp@google.com Suppress MultithreadingTest.MultiContextClear on Linux+Nvidia
2021-05-11 jonahr@google.com Change to module directory when loading swiftshader ICD.

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: angle_perftests --gtest_filter="*dr_driving*"
Test: Test: angle_perftests --gtest_filter="*summoners_war*"
Change-Id: I11bc93e5bfb59514ec06210a37a58cfd19109de3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407759
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-05-12 21:42:52 +00:00
Chris Dalton
0d0b1b3b56 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>
2021-05-12 21:23:02 +00:00
Chris Dalton
84f70136ab 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>
2021-05-12 20:57:23 +00:00
Robert Kroeger
1a14c4aa0a Revert "When running on ANGLE GL backend use the underlying GL driver info"
This reverts commit bb006430ae.

Reason for revert: https://crbug.com/1208437 in Chrome: multiple
breakage on Android devices.

Original change's description:
> When running on ANGLE GL backend use the underlying GL driver info
> to setup caps.
>
> Bug: 1203705
> Change-Id: Ia50dfc6aef44848d81c735dc98dafdc692e8da40
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/406117
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Bug: 1203705
Change-Id: Idb3183ddb8c2564005871c27d19feff6c4292d7f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407498
Reviewed-by: Robert Kroeger <rjkroege@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Auto-Submit: Robert Kroeger <rjkroege@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-05-12 20:35:03 +00:00
Brian Salomon
33ec611316 viewer can show offscreen layers in MSKPSlide
Also three fixes for drawing to offscreen layers in MSKPPlayer:
*Only play from last full redraw to next cmd
*Clear before full redraw
*Actually track current cmd in layer state.

Bug: skia:11900
Change-Id: I988afb61f96c8acb7e7554d65bfa6cd6020196c7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407460
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-05-12 19:49:03 +00:00
Robert Phillips
09b2bcbb81 Add SkBaseGpuDevice ...
between SkBaseDevice/SkClipStackDevice and SkGpuDevice/SkGpuDevice_nga

The idea is that SkCanvas will deal with SkBaseGpuDevices rather than SkGpuDevice*s

Change-Id: I1bffeccab44d2a2b73413f50d7c905fa2df8eedc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407459
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-05-12 19:26:52 +00:00
Michael Ludwig
4e9d5e2bdf Use Wang's formula for quadratic and cubic point counts
- most of the small diffs are because I moved GrWangsFormula.h out
   of the tessellate/ directory and into the geometry/ directory since
   it's more general than HW tessellation.

The previous implementation was based on the heuristic that the distance
from the true curve to the line segment would be divided by 4 every time
the curve was recursively subdivided. This was a reasonable
approximation if the curve had balanced curvature on both sides of the
split. However, in the case of the new GM's curve, the left half was
already very linear and the right half had much higher curves.

This lead to the approximation reporting fewer points than required.
Theoretically, those few points that weren't utilized by the left half
of the curve could have been made available to the right half, but the
implementation of that would be tricky.

Instead, it now uses Wang's formula to compute the number of points.
Since recursive subdivision leads to linearly spaced samples assuming it
can't stop early, this point count represents a valid upper bound on
what's needed. It also then ensures both left and right halves of a
curve have the point counts they might need w/o updating the
generation implementations. However, since the recursive point
generation exits once each section has reached the error tolerance, in
scenarios where the prior approximation was reasonable, we'll end up
using fewer points than reported by Wang's. Hopefully that means there
is negligible performance regression since we won't be increasing
vertex counts by that much (except where needed for correctness).

Bug: skia:11886
Change-Id: Iba39dbe4de82011775524583efd461b10c9259fe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405197
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2021-05-12 18:33:33 +00:00
John Stiles
90508f02dc 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>
2021-05-12 18:15:04 +00:00
Mike Reed
e3bea7a60a Can ctrl-key work on non-macs?
Change-Id: I9cd06689c209941a45a8e842eb0dca99abc11a5b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407497
Reviewed-by: Mike Reed <reed@google.com>
2021-05-12 17:53:41 +00:00
Ethan Nicholas
22dcb738b0 Revert "Revert "Added DSL flags""
This reverts commit 9eb0bb6256.

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

Change-Id: I685478018bf48e5c06a57e9ca5542501d41c2b27
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407458
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2021-05-12 17:50:22 +00:00
Herb Derby
4ce8189c4d switch to SkMutex in SkStrike
The docs team is producing thumbnails for pages using 20
threads. About 0.1% of their machines are showing massive
slowdown and contention. When looking at /profilez most of the
threads are waiting in spin locks to find a strike. This is
keeping the server from doing work on other pages that can make
progress. Move from SkSpinlock to SkMutex to allow other threads
to make progress.

Bug: b/182395513

Change-Id: I96448d784198041390e62bc5507ab0081d8f71b4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407097
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2021-05-12 17:23:23 +00:00
Mike Reed
0270bf5d10 Add shader styling
Change-Id: I0ce66418d98160ae9bd343fbe62b47fd86f328f0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407496
Reviewed-by: Mike Reed <reed@google.com>
2021-05-12 16:35:59 +00:00
Brian Salomon
71f5b92f4c Remove workaround for angle bug 4536
Bug is fixed in angle

Bug: angleproject:4536
Change-Id: I79e6560ea5afc330e98bb2a7e1be7b4e366a1f51
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407016
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-05-12 16:34:42 +00:00
John Stiles
86121f6c0e 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>
2021-05-12 16:11:04 +00:00
Michael Ludwig
9ec377e999 Reland "Simplify quickReject implementation in SkCanvas"
This is a reland of 0a0f4f5c35

This change makes SkCanvas::quickReject always reject empty draw bounds,
whereas previously scale+translate CTMs allowed bounds with w or h == 0
but otherwise contained in the clip to be drawn. This uncovered some
bugs in Skia where bounds shouldn't be empty, and in Flutter where
bounds were legit empty but not expected by the test.

No code changes needed. The issues that required its revert have been
fixed with:
1. https://github.com/flutter/engine/pull/26053 so that platforms that
use an empty typeface, leading to empty draws are just skipped.
2. https://skia-review.googlesource.com/c/skia/+/406140 so that path
effects update bounds so that Android's 1D dash path effect applied to
a horizontal line is properly not rejected.

Based on the period of time where the original CL was landed, some perf
data was collected.
- There were no significant changes in most SKPs or SVGs, except for a
Flutter page flip skp, which saw a 10% net improvement (perhaps the
flip is drawn with perspective?)
- A 10-20% regression in the motionmark paths skp, but dominated by the MSVC
compiler, so I'm not too concerned about that.
- Perspective microbenchmarks for drawing rectangles are 1.5-2x faster.
- quickReject microbenchmarks are about 2x slower.

The last two microbenchmark results aren't surprising since perspective
was the largest improvement in perf for SkM44::MapRect vs.
SkMatrix::mapRect, and the scale+translate specializations in Skmatrix
were maybe 50% faster than SkM44's. That would account for some of the
slow downs, and the rest could be explained by moving away from the
SIMD rect intersection and nan test.

Since these microreductions don't seem to bleed into more complex
benchmarks, I'm inclined to keep the code simple and not bring back the
custom intrinsics.

Original change's description:
> Simplify quickReject implementation in SkCanvas
>
>  - SkCanvas no longer keeps fIsScaleTranslate bool that has to stay in
>    sync with the type of the matrix.
>  - No more fast or slow path for quickReject, the Sk4f code has been
>    completely removed.
>  - Uses SkM44::mapRect instead of SkMatrix::mapRect. This is slightly
>    slower for S+T, but much faster for other transforms. I'm hopeful we
>    won't notice the regression in the grand scheme for S+T, since the
>    code is a lot simpler now.
>  - The final isFinite() and intersects() check for quickReject uses
>    SkRect's functions instead of hand-written SSE/NEON. If we think this
>    is optimization is necessary, I'm hoping we can rewrite it in terms
>    of skvx instead of specific instructions.
>  - Consolidated how the quick-reject bounds outsetting into
>    computeDeviceClipBounds, and added an option to skip outsetting for
>    the one call site that doesn't want it.
>
> Bug: skia:10987
> Change-Id: I3cf2a73636cdeed06d12cab4548cfb94d1eb074a
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405198
> Commit-Queue: Mike Reed <reed@google.com>
> Auto-Submit: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Mike Reed <reed@google.com>

Bug: skia:10987
Change-Id: Id0d4b4ecebf0b83ae30f7e1a263961ab25de28dd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407358
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2021-05-12 15:46:12 +00:00
Jorge Betancourt
2446196688 3d cube initial demo
Change-Id: Idc3d05eeac13715d2cb57d5930e9642181fc670d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/406436
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2021-05-12 15:41:52 +00:00
Mike Reed
433d25c947 Safeguard against wacky keys for now
Change-Id: I48e8a5a6bbf66a11c71d676e11b3d5f7c84cb29d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407456
Reviewed-by: Mike Reed <reed@google.com>
2021-05-12 15:33:23 +00:00
John Stiles
cc29ca5196 Remove SK_DISABLE_NONSQUARE_MATRIX_TRANSFORM guard flag.
Do not land until http://go/jrev/c/2889593 has been submitted into
Chromium.

Change-Id: I40f2543d89c6aa56c24c84f50ab6c89fcb40e465
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407156
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-05-12 15:08:22 +00:00