Commit Graph

55049 Commits

Author SHA1 Message Date
John Stiles
1dc2d0fe0f Allow compile-time intrinsic evaluation to read const variables.
Previously, the code neglected to resolve constant variables into
values. This meant that expressions like `lessThan(zero, one)` could not
be compile-time evaluated even when `zero` and `one` have known values.

Change-Id: I2f5ce303e3dcc682be14e4d2485e24dd7c59212e
Bug: skia:10835
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405536
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-05-07 13:36:08 +00:00
John Stiles
aaac4e4e3e Use the IntrinsicKind to look up SPIR-V intrinsic calls.
This is more efficient than looking up the intrinsic by name.

Change-Id: I69bc5734073477d4359ef2b37c4b37dffc90fed5
Bug: skia:11961
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405278
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-05-07 13:32:38 +00:00
Brian Salomon
1989342920 Consolidate gathering of info from GL strings.
Should not change functionality.

Bug: 1203705
Change-Id: I2a17fb0ccb729033c964a138dbd5e86be7f93d9e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405200
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-05-07 13:20:18 +00:00
Greg Daniel
daa02f4021 Revert "Simplify quickReject implementation in SkCanvas"
This reverts commit 0a0f4f5c35.

Reason for revert: possible cause of flutter roll failure

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>

TBR=mtklein@google.com,reed@google.com,michaelludwig@google.com

Change-Id: I1a373740ee167827b9a6a2eee9afb7f814641fb0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10987
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405616
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-05-07 12:55:19 +00:00
Greg Daniel
bb4bf6eaaf Revert "LRU Cache requires exact float comparison"
This reverts commit 85a51865f9.

Reason for revert: possibly causing flutter roll failure

Original change's description:
> LRU Cache requires exact float comparison
>
> Bug: oss-fuzz:30314
> Change-Id: Id5dccdbab2a4801e6796254a68e417dbdc0f7a4a
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404780
> Commit-Queue: Julia Lavrova <jlavrova@google.com>
> Reviewed-by: Ben Wagner <bungeman@google.com>

TBR=bungeman@google.com,jlavrova@google.com

Change-Id: I2cbbcf667734145b94359be4331bbf21e299d6a0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: oss-fuzz:30314
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405576
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-05-07 12:43:39 +00:00
skia-autoroll
703f68e660 Roll SwiftShader from e839645bb9a6 to 8b09c1078a2b (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/e839645bb9a6..8b09c1078a2b

2021-05-06 swiftshader.regress@gmail.com Regres: Update test lists @ 04c037ac

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 egdaniel@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: egdaniel@google.com
Change-Id: Id66f547bff6221c776105aee4a6e52332b959993
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405526
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-05-07 05:14:02 +00:00
skia-autoroll
17a6ccbb5a Roll Chromium from 8e935e49a890 to 54647a439c14 (553 revisions)
8e935e49a8..54647a439c

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 egdaniel@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: egdaniel@google.com
Change-Id: Ia67f45fc59b2e58ec3753a32f3c15c16ea97224e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405525
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-05-07 05:08:59 +00:00
skia-autoroll
0ee37ead0e Roll Dawn from f3e4779031bd to 09a97ad44611 (11 revisions)
https://dawn.googlesource.com/dawn.git/+log/f3e4779031bd..09a97ad44611

2021-05-07 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from fe5c3058919c to 698d01383cda (3 revisions)
2021-05-07 shaobo.yan@intel.com Add validation rules for CopyTextureForBrowser
2021-05-06 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from d2be7cea9058 to fe5c3058919c (8 revisions)
2021-05-06 cwallez@chromium.org Properly implement per-dispatch synchronization scopes.
2021-05-06 senorblanco@chromium.org Fixes for OpenGL loader generator.
2021-05-06 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 0aeb77c40f89 to d2be7cea9058 (4 revisions)
2021-05-06 cwallez@chromium.org Only run the BoundArrayAccessors transform when robustness is on.
2021-05-06 cwallez@chromium.org Move noop dispatch handling to the Metal backend
2021-05-06 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from b4a8a15bd216 to 0aeb77c40f89 (1 revision)
2021-05-06 cjj19970505@live.cn Remove unnecessary "#if def"s and type conversion in windows compilation.
2021-05-06 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from ba08d7bca3c9 to b4a8a15bd216 (3 revisions)

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from ba08d7bca3c9 to 698d01383cda

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 bajones@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: bajones@google.com
Change-Id: I0956e5f9ccd8142feaf60eda22f386b4b6712866
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405528
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-05-07 05:08:57 +00:00
Mike Reed
c48c3e5d57 Try new factory for ShapedLines
Known hacks for now:
- only default typeface
- only ascii support

Fonts have several limitations for now.

SkParagraph (our temporary backend) wants a fontmgr up front,
rather than just relying on the typefaces in its styles. This makes it
hard to inter-op with our JS api. Not a long-term problem, as this
backend is short-term. The hacky work-around is just to pass NULL for
the typeface for now.

Related but different, I haven't yet figured out how to "return" a
JS Typeface object. Something about bare-pointers and sk_sp. I'll figure
it out eventually, but for now I just set the output slot to null
as well. (there's a TODO in the .cpp)

Ascii support

JS strings are UTF16 (afaik). However, our current backend thinks in
terms of UTF8 offsets. Plus, (at the moment) when I try to access the
JS string for C++, it coerces to utf8 (std::string).

We can fix both of these eventually, but for now I'll just test with
ascii input characters, and the API can still work.


Change-Id: I62ca71b0b45d017ac8e3881c06720776dc2d75a1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405400
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
2021-05-06 23:01:47 +00:00
Chris Dalton
2ed22faaa1 Rename GrTessellatingStencilFillOp -> GrPathStencilFillOp
This makes the class name conform to the same pattern as the other
tessellation ops: stroke tessellation ops begin with GrStroke* and
fill tessellation ops now begin with GrPath*.

Change-Id: I454341ec95438637ee2a4e501a374f8f59622550
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405018
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-05-06 22:59:47 +00:00
Ben Wagner
04e643e462 Fix cache race in SkTypeface_Mac::Make
It was possible that multiple threads could detect that an entry did not
exist in the cache, both create a new entry, and both add to the cache.
The first to put an entry into the cache would be what subsequent
threads would retrieve from the cache.

Re-organize the code to avoid this race, make it easier to see that
typefaces created from data are not cached, and only take the mutex
once when using the cache.

Change-Id: I9a45a85ecc142d03d901037519eea0e56d30e877
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405436
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2021-05-06 22:46:47 +00:00
Jim Van Verth
6a1c8adf2a Direct3D: enable texture copies
Copying textures has been implemented but the caps flag wasn't set. Also
adds some comments about format requirements.

Change-Id: I8b9b3b9c88c72fad44a3a7191fc17054d5def938
Bug: skia:10446
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/403599
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2021-05-06 21:46:17 +00:00
Jim Van Verth
7589aa0bbc Direct3D: handle odd widths and heights for mipmap generation.
Uses an approximate triangle filter to replace the simple bilerp
in these cases.

Change-Id: I7cd32a5bce168a99563d0e834413a58c486cb6f9
Bug: skia:10446
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404976
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2021-05-06 20:49:57 +00:00
Michael Ludwig
0a0f4f5c35 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>
2021-05-06 20:45:17 +00:00
Julia Lavrova
85a51865f9 LRU Cache requires exact float comparison
Bug: oss-fuzz:30314
Change-Id: Id5dccdbab2a4801e6796254a68e417dbdc0f7a4a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404780
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2021-05-06 20:25:27 +00:00
Greg Daniel
4a58bdea4d Correctly handle failure to allocate samplers in Vulkan backend.
Change-Id: I2e69e62c49e153437b93e082419e6981f438dfc3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405262
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-05-06 19:39:17 +00:00
Florin Malita
71863fa787 [androidkit] Canvas save/concat/restore
Change-Id: Ide67a67e542b4e0962475e0638b95d3edb416c68
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405279
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2021-05-06 17:39:57 +00:00
Julia Lavrova
a6bcec7dd8 Ensure TextBlobCache is populated before getShapedRuns.
Also fixing a small problem with offsets that never appeared
because we never use this code path (but could)

Bug: skia:11947
Change-Id: I8c02c696797ea45d35fcab5746fbc079326e4539
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404897
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2021-05-06 17:39:37 +00:00
Michael Ludwig
97f85bb7fd Remove SkTextBlobDiffCanvas, use tracking device directly with base SkCanvas
Chromium has been updated to use makeAnalysisCanvas directly and there are
no more references to SkTextBlobDiffCanvas as a type in its code base.

Since the GlyphTrackingDevice extends SkNoPixelsDevice, any SkCanvas that
uses it is effectively a "no-draw" canvas. However, by returning a base
SkCanvas the text tracking now automatically happens in the context of
the base's AutoLayerForImageFilter handling it applies on every draw. This
means that drawing a text blob with an image filter that modifies the
transform state will now be analyzed in that context automatically
(simplifying code in chrome after this lands).

Another behavioral change is that all non-text draws will still go through
the base SkCanvas' virtuals and invoke the device function. Since it's an
SkNoPixelsDevice, it'll still be a no-op, it just happens a little later.
This won't really impact performance because oop-r already inspects their
operations and only plays back text and transform related ones to the
analysis canvas, so we shouldn't really see non-text draws being invoked
anyways.

Bug: chromium:1187246
Change-Id: I83f86571300751f385b3065dfe889f218fa1edc6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405196
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2021-05-06 16:11:57 +00:00
Ethan Nicholas
722cb67b09 Improved DSL APIs in preparation for DSLParser
This includes several new array variants of existing APIs, DSLBlock now
supporting SymbolTables, and a couple of other minor changes needed by
the upcoming DSLParser.

Change-Id: I71feb268feb27cf7ff453cc59046091779bffe06
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404779
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-05-06 15:46:47 +00:00
John Stiles
032fcba498 Use the IntrinsicKind to look up SkVM intrinsic calls.
We no longer need to maintain a separate mapping table of intrinsic
function names in SkVM.

Change-Id: Ia3be89f9d2fc792adad2f06acc2373363497a6b7
Bug: skia:11961
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405277
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>
2021-05-06 15:44:47 +00:00
Florin Malita
d7a4c05aba [skottie] Add support for min/max text font size
Introduce two new text properties to control the font size range when
auto-scaling text:

 - plumb new json props ('mf' -- minimum font size, 'xf' -- maximum
   font size)
 - update the scale-to-fit binary search to use the specified extremes

Change-Id: I9e7e4915936a0be74bea473a520cf75acc05c84b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404781
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2021-05-06 15:41:07 +00:00
Jim Van Verth
b6108b8339 Direct3D: fix clang warning
Change-Id: Ifd909e237bc3ed1ee9bcafccb5ddcc849ba106e4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405276
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2021-05-06 15:27:17 +00:00
John Stiles
496b7d1e17 Use the IntrinsicKind to look up Metal intrinsic calls.
We no longer need to maintain a separate mapping table of intrinsic
function names in Metal.

Change-Id: Ib14b76d3a47a396c4a09adb11e0fd3c144501032
Bug: skia:11961
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405236
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-05-06 15:14:57 +00:00
John Stiles
1d1e66e8c5 Use the IntrinsicKind to look up DSL built-in calls.
This is more efficient than looking up the intrinsic by name.

Change-Id: Iab8d3bc651a0574f783414ad6acae1772ab12668
Bug: skia:11961
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405116
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-05-06 15:09:47 +00:00
skia-autoroll
9a9a08315c Roll SK Tool from b54769d17f71 to 7993d65680f2
https://skia.googlesource.com/buildbot.git/+log/b54769d17f71..7993d65680f2

2021-05-06 kjlubick@google.com [gold] Use materialized views in search.
2021-05-06 kjlubick@google.com [infra] Update Cockroachdb to 20.2.8
2021-05-05 rmistry@google.com Automatically set owner from committedImage in DirtyCommittedK8sImage alerts
2021-05-05 rmistry@google.com [am] Display full name of alerts and silences during mouseover
2021-05-05 kjlubick@google.com [infra] Update bazel image to Cockroach 20.2.8
2021-05-05 rmistry@google.com whitespace test in buildbot

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 rmistry@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: rmistry@google.com
Change-Id: Id1ffc19b8667fe1cd9a94a0104ed70c373c8a6e3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405216
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-05-06 14:22:17 +00:00
John Stiles
a5f1697d05 Optimize intrinsic vector comparisons of constants.
If every argument passed to lessThan/greaterThan/lessThanEqual/
greaterThanEqual/equal/notEqual() is a compile-time constant, we now
detect this and optimize away the function call entirely.

Change-Id: I3415d21be6ef51b38b682a792bd118fad51957f5
Bug: skia:10835
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404776
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-05-06 14:00:27 +00:00
Robert Phillips
abf035357f Revert "Disallow caching of non-ninepatchable blur mask filtered round rects"
This reverts commit baa74dc154.

Reason for revert: big perf regression on Mali400 and Tegra3 - we will try making the key more cache-friendly

Original change's description:
> Disallow caching of non-ninepatchable blur mask filtered round rects
>
> From our simulation of the Camera App's behavior we get:
>
> w/ caching (old):
>     Textures Created: 802
>     Texture Uploads: 802
>
> w/o caching (new):
>     Textures Created: 6
>     Texture Uploads: 802
>
> Bug: b/185828492, skia:11953
> Change-Id: I7975033bf9f7d24ede6f1add23fe95cda3ba5669
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404202
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,robertphillips@google.com

Change-Id: If1f4065041b1a3800d35be7ba7c8c897211cc553
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: b/185828492
Bug: skia:11953
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404916
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-05-06 13:04:10 +00:00
John Stiles
28181e70ce Optimize away intrinsics any() and all() when their inputs are known.
If every argument passed to any() or all() is a compile-time constant,
we now detect this and optimize away the function call entirely.

Future CLs will perform a similar optimization on other intrinsic calls
which can be detected and eliminated at compile time, like lessThan().

Change-Id: Ie55aff538b1ccaf2b3bcf9a69573a85f081b7ade
Bug: skia:10835
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404417
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-05-06 12:43:57 +00:00
John Stiles
a289ac2cbe Use AutoSource to set the compiler's source everywhere.
Based on the comments, the original motivations for not using AutoSource
in one spot were apparently that the source text was needed to display
error text after a failed compile. This doesn't seem to be the case
anymore; all tests still pass, generating the same error messages, and I
don't see a way for the source pointer to be used meaningfully after a
compile.

Change-Id: Iec45af6409e4f5ab7faa4bd79466c18a6242c2b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404337
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-05-06 12:34:57 +00:00
Kevin Lubick
03bd60365e [infra] Update cockroachdb to 20.2.8
Change-Id: I1675091468773e975f16e298e8a0f187bce24717
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404896
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2021-05-06 12:22:30 +00:00
John Stiles
f96cb712d7 Keep the intrinsic kind of a FunctionDefinition in its IRNode.
This simplifies intrinsic identification from our backends. Rather than
needing to manually track a list of strings in each backend, we can just
call `funcCall.function().intrinsicKind()` and use the shared enum.

In this CL, the GLSL backend has been converted to use the intrinsicKind
call. Other backends will be updated in followup CLs.

Change-Id: I47491655108a08b7414bfa293807d46ad948084a
Bug: skia:11961
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404898
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-06 12:16:17 +00:00
skia-autoroll
148f601225 Roll Dawn from a7f1c50f498e to f3e4779031bd (9 revisions)
https://dawn.googlesource.com/dawn.git/+log/a7f1c50f498e..f3e4779031bd

2021-05-05 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from bd7e8442b8c3 to ba08d7bca3c9 (11 revisions)
2021-05-05 cwallez@chromium.org Separate the types for compute and render pass usage data
2021-05-05 cwallez@chromium.org EncodingContext: Forward the backtrace of stored errors.
2021-05-05 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 02ebf0dcae51 to bd7e8442b8c3 (4 revisions)
2021-05-05 cwallez@chromium.org Fix missing dependency for the OpenGL loader generator.
2021-05-05 cwallez@chromium.org CommandBufferResourceUsage: track render and compute separately.
2021-05-05 cwallez@chromium.org Remove unused utils::SingleShaderStage enum
2021-05-05 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 781de097ebbc to 02ebf0dcae51 (1 revision)
2021-05-05 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from df48b955b2e5 to 781de097ebbc (1 revision)

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from df48b955b2e5 to ba08d7bca3c9

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 bajones@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: bajones@google.com
Change-Id: Ia1e10a13c23df1012fff71a45f85e17caee230c8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405078
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-05-06 05:02:01 +00:00
skia-autoroll
4717886f19 Roll SwiftShader from 484a3e15893c to e839645bb9a6 (5 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/484a3e15893c..e839645bb9a6

2021-05-06 sugoi@google.com Revert "Obtain all sampler parameters through SamplingRoutineCache::Key"
2021-05-05 srisser@google.com Implement depthClamp
2021-05-05 srisser@google.com Implement VK_EXT_depth_clip_enable
2021-05-05 sugoi@google.com Obtain all sampler parameters through SamplingRoutineCache::Key
2021-05-05 sugoi@google.com Obtain ImageView state uniquely from its identifier

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 egdaniel@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: egdaniel@google.com
Change-Id: I68d51f42f65ec5e891177fd52bc03fa5922b4704
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405076
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-05-06 05:00:51 +00:00
skia-autoroll
6f70cdefe6 Roll Chromium from 565426207196 to 8e935e49a890 (460 revisions)
5654262071..8e935e49a8

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 egdaniel@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: egdaniel@google.com
Change-Id: Ifdcb92ed5a97d38d6faa448721f2716d0d7f017a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405056
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-05-06 04:56:56 +00:00
skia-autoroll
e33b3a032b Roll ANGLE from c6fb0e5afbdb to 69d593b5d650 (20 revisions)
c6fb0e5afb..69d593b5d6

2021-05-06 cnorthrop@google.com Docs: Update RenderDoc for Android launch command
2021-05-06 ynovikov@chromium.org Temporarily remove standalone tester bots from CQ.
2021-05-06 syoussefi@chromium.org Revert "Use ANGLE GL for Lacros Chrome"
2021-05-06 jmadill@chromium.org infra: Exclude infra/specs from analyze.
2021-05-05 jmadill@chromium.org infra: Enable dcheck_always_on in Release.
2021-05-05 jmadill@chromium.org infra: Switch CI to use component builds everywhere.
2021-05-05 jmadill@chromium.org Run test spec update as part of codegen.
2021-05-05 jmadill@chromium.org Fixes to roll_chromium_deps.py.
2021-05-05 jmadill@chromium.org infra: Add Linux isolated scripts to specs.
2021-05-05 syoussefi@chromium.org Fix Vulkan-only build
2021-05-05 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from e9e6d55fed07 to 2270e13321c2 (399 revisions)
2021-05-04 tandrii@google.com [infra][realms] upgrade to LUCI security realms in all Angle builds.
2021-05-04 cclao@google.com Vulkan: minimize-gpu-work: Skip blit from offscreen fbo
2021-05-04 cclao@google.com Vulkan: offscreen perftests: use two FBOs and call glFlush every frame
2021-05-04 elkurin@chromium.org Use ANGLE GL for Lacros Chrome
2021-05-04 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 4676514cf188 to bc5a26253bb7 (7 revisions)
2021-05-04 syoussefi@chromium.org Vulkan: Fix MAX_VERTEX_OUTPUT_COMPONENTS limit
2021-05-04 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 34166dd37ed5 to e9e6d55fed07 (345 revisions)
2021-05-04 gert.wollny@collabora.com Capture/Replay: Enable test for CopyTextureTestWebGL.NPOT
2021-05-04 gert.wollny@collabora.com Capture/Replay: capture WebGL compatibility

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 egdaniel@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: egdaniel@google.com
Change-Id: Iec9803124213bbb17063fd505cde41ddfacb0229
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405077
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-05-06 04:55:46 +00:00
Brian Osman
c9125aa8f3 Reland "Better first-class shader & color filter support in runtime effects"
This is a reland of adadb95a9f
... adds a temporary workaround for some Android framework code.

Original change's description:
> Better first-class shader & color filter support in runtime effects
>
> This does a few things, because they're all intertwined:
>
> 1) SkRuntimeEffect's API now includes details about children (which Skia
>    stage was declared, not just the name). The factories verify that the
>    declared types in the SkSL match up with the C++ types being passed.
>    Today, we still only support adding children of the same type, so the
>    checks are simple. Once we allow mixing types, we'll be testing the
>    declared type against the actual C++ type supplied for each slot.
> 2) Adds sample variants that supply the input color to the child. This
>    is now the only way to invoke a colorFilter child. Internally, we
>    support passing a color when invoking a child shader, but I'm not
>    exposing that. It's not clearly part of the semantics of the Skia
>    pipeline, and is almost never useful. It also exposes users to
>    several inconsistencies (skbug.com/11942).
> 3) Because of #2, it's possible that we can't compute a reusable program
>    to filter individual colors. In that case, we don't set the constant
>    output for constant input optimization, and filterColor4f falls back
>    to the slower base-class implementation.
>
> Bug: skia:11813 skia:11942
> Change-Id: I06c41e1b35056e486f3163a72acf6b9535d7fed4
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/401917
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>

Bug: skia:11813 skia:11942
Change-Id: I2c31b147ed86fa8c4dddefb7066bc1d07fe0d285
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404637
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-05-05 22:06:46 +00:00
Greg Daniel
40ff868be1 Revert "Re-enable tessellation for cacheable strokes"
This reverts commit 5e1f135376.

Reason for revert: breaking pixel test on chrome roll

Original change's description:
> Re-enable tessellation for cacheable strokes
>
> Now that the fixed count stroke tessellator has landed, these should
> hopefully not regress performance.
>
> Bug: skia:11138
> Bug: skia:11139
> Change-Id: I1a7d756e2a8a55f9ad4aaed716e4816b342b3b4f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404398
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

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

Change-Id: I723bbb3f6ee8f2cfbf80a1475b351a87f82e4d2b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11138
Bug: skia:11139
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404919
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-05-05 22:02:17 +00:00
Adlai Holler
ae333c414a Reland "Re-enable CCPR atlasing + reordering"
This reverts commit 6924597f2a.

Reason for revert: didn't break chrome roll

Original change's description:
> Revert "Re-enable CCPR atlasing + reordering"
>
> This reverts commit 4b6b1dd218.
>
> Reason for revert: random guess for chrome roll pixel test failure
>
> Original change's description:
> > Re-enable CCPR atlasing + reordering
> >
> > CCPR atlasing now handles merged tasks correctly so they can work
> > together happily again.
> >
> > Bug: skia:10877, skia:11731
> > Change-Id: Id15c8fc3ed0560150f5c373651f5c583239f3e09
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404136
> > Commit-Queue: Adlai Holler <adlai@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
>
> TBR=robertphillips@google.com,adlai@google.com
>
> Change-Id: I2f66c025702c023989c6cbd7ef0f73f4f35738df
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:10877
> Bug: skia:11731
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404456
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

# Not skipping CQ checks because this is a reland.

Bug: skia:10877
Bug: skia:11731
Change-Id: I3556f21768b097a3de892996be3c65d76b140b4d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404782
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2021-05-05 21:55:46 +00:00
Chris Dalton
a7dffa17ea Use coverage AA for dmsaa dashes
Total DMSAA Multisample Render Passes: 220 -> 190

Bug: skia:11396
Change-Id: Ifac3989d042fa1adc14a01625d1976ae1454b646
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/403976
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2021-05-05 20:41:36 +00:00
Chris Dalton
9ad1e6d80a Disable MSAA on Pixel5
This fixes a driver crash.

Bug: skia:11152
Change-Id: I0e59a7ae521511d15933e2182ecd1d0acbe33bde
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/403916
Auto-Submit: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-05-05 20:34:16 +00:00
Michael Ludwig
daa9b8e4d9 Add mapRect function and RectToRect constructor to SkM44
The SkM44::RectToRect function matches the semantics of
SkMatrix::RectToRect(kFill_ScaleToFit). No other ScaleToFit variants are
ported over to SkM44.

skottie uses some instances of kCenter_ScaleToFit so that functionality
may need to be added in the future (in SkM44 or in skottie). There are
no current usages of the kStart and kEnd_ScaleToFit semantics.

The SkM44::mapRect() function is implemented to correspond to the
SkMatrix::mapRect() that returns the mapped rect (instead of modifying a
pointer) and always has ApplyPerspectiveClip::kYes. This was chosen to
keep its behavior simple and because perspective clipping is almost
always the right thing to do. In the new implementation there is no
longer a performance cliff to worry about (see below). For the timebeing
mapRect is hidden behind SkMatrixPriv::MapRect().

Performance:
I added benchmarks for mapRect() on SkM44 and SkMatrix that use the same
matrices to get a fair comparison on their different specializations.
SkMatrix has a very efficient mapRect when it's scale+translate or
simpler, then another impl. for affine matrices, and then falls back to
SkPath clipping when there's perspective. On the other hand, SkM44 only
has 2 modes: affine and perspective.

On my desktop, with a Ryzen 9 3900X, here are the times for 100,000 calls
to mapRect for different types of matrices:
                         SkMatrix    SkM44
scale+translate           0.35 ms    0.42 ms
rotate                    1.70 ms    0.42 ms
perspective              63.90 ms    0.66 ms
clipped-perspective      138.0 ms    0.96 ms

To summarize, the SkM44::mapRect is almost as fast as the s+t specialization
in SkMatrix, but for all non-perspective matrices. For perspective matrices
it's only 2x slower than that specialization when no vertices are clipped,
and still almost 2x faster than the affine specialization when vertices are
clipped (and 100x faster than falling back to SkPath).

Given that, there's the open question of whether or not keeping an affine
specialization is worth it for SkM44's code size.

Bug: skia:11720
Change-Id: I6771956729ed64f3b287a9de503513375c9f42a0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/402957
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
2021-05-05 19:57:26 +00:00
Greg Daniel
8f9c8ad6b8 Fix checkout for dfdx in distance field proc.
We were relying on a compile thing for this check which isn't really
right. We probably got away with it since the only bad gpu was Mali
400 and that probably never compiled with vulkan enabled. But still we'd
end up in weird cases were a different backend would change how it
worked here depending on if vulkan happen to also be compiled or not.

Change-Id: Ie06519e110cd7eb92384bce4ec3d8211cfc92488
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404917
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-05-05 19:39:26 +00:00
Chris Dalton
8a42dc1e67 Don't use drawVertices for blur masks
Total DMSAA Multisample Render Passes: 190 -> 110

Bug: skia:11396
Change-Id: I721de497f497c40e854d219829e853765e2dc778
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404856
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-05-05 19:30:36 +00:00
Eric Boren
7987bbdabf [infra] Fix asset_utils import
Change-Id: Ibb1c563fccae980ad23fac7c41bc5dc91a9925c0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404876
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
2021-05-05 19:10:25 +00:00
Chris Dalton
8974746b1a Disable triangulating path renderer on dmsaa
Total DMSAA Multisample Render Passes: 370 -> 220

Bug: skia:11396
Change-Id: Ibedc77a398cfe656bcb3999bd968356e221990ff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399841
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2021-05-05 19:06:26 +00:00
Jim Van Verth
872df6e64b Add basic D3D mipmap support.
This adds support for mipmap generation in the simplest case:
* power-of-two
* non-sRGB
* not BGR

The mipmaps are generated with a compute shader that reads from a SRV
of one miplevel and then writes to a UAV at miplevel+1. Miplevel+1 is
then transitioned to a resource state that can be read from, and the
process continues for miplevel+1 and miplevel+2, etc.

Change-Id: Id467d0e56d5408559d3cacec1514f1b43d76d640
Bug: skia:10446
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/392917
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2021-05-05 18:51:26 +00:00
John Stiles
98378352be Optimize splat constructors containing const vars.
A constructor like `float3(five)` is not a compile-time constant, so we
miss optimization opportunities like folding. Constant variables inside
splat constructors are now replaced when optimization is on, so this
would optimize down to `float3(5.0)` and be eligible for folding.

Change-Id: I4bf6f52a48ef733e6b24791d02687081194ef488
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404676
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-05-05 17:44:06 +00:00
Kevin Lubick
3232a6625b [canvaskit] Small example fixes
Change-Id: If7a05b34975f2fee8f057e649bfe3a7b0fc541b9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404778
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2021-05-05 17:20:26 +00:00
Chris Dalton
ffbeda78c5 Respect initial stencil contents when merging opsTasks
Bug: skia:11952
Change-Id: I0eb6f578dcc95fa6e92ff959a6483c7583d0ad9b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404396
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-05-05 16:53:07 +00:00