Commit Graph

51231 Commits

Author SHA1 Message Date
John Stiles
6f3015a562 Reland "Add sk_Caps.builtinDeterminantSupport and use it in cross()."
This is a reland of 6bbf026b54

Original change's description:
> Add sk_Caps.builtinDeterminantSupport and use it in cross().
>
> This CL partially relands http://review.skia.org/321790.
>
> Change-Id: I26a1aefda8a01167783e6e7fa15a51aa35ee5d82
> Bug: skia:10819, skia:10810
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323784
> Reviewed-by: Chris Dalton <csmartdalton@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>

Bug: skia:10819
Bug: skia:10810
Change-Id: I7731f93db07bc917707cbbe1daca2e5ce0f763d7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324620
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-10-09 14:45:23 +00:00
Adlai Holler
9555f2934d Reland "Merge GrContext::init into GrDirectContext ..."
This reverts commit e9b9c3bd7f.

Reason for revert: Fixed MSVC

Original change's description:
> Revert "Merge GrContext::init into GrDirectContext ..."
>
> This reverts commit 48d8724097.
>
> Reason for revert: Breaking MSVC bots
>
> Original change's description:
> > Merge GrContext::init into GrDirectContext ...
> >
> > And minor cleanups associated with the initialization of these classes.
> >
> > Change-Id: Ida0372d0b1a0b8bf5b309814de5418e47ea34fdb
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324122
> > Commit-Queue: Adlai Holler <adlai@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > Auto-Submit: Adlai Holler <adlai@google.com>
>
> TBR=robertphillips@google.com,adlai@google.com
>
> Change-Id: I00b2ddaeaef53e3fe05a338c88158cf235f325c4
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324132
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>

TBR=jvanverth@google.com,robertphillips@google.com,adlai@google.com


Change-Id: I88bac7cd3aab070460671e82cbd924fbb42a2740
Cq-Include-Trybots: luci.skia.skia.primary:Build-Win-MSVC-x86_64-Release-Shared,Build-Win-Clang-x86_64-Release-Shared
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324616
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
2020-10-09 14:42:43 +00:00
John Stiles
eaaa71b705 Add test for sk_Caps.mustGuardDivisionEvenAfterExplicitZeroCheck.
Change-Id: Ib1374e1dce1a654a83813dbe341774bd91729796
Bug: skia:10694, skia:10819
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324356
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-10-09 13:48:13 +00:00
John Stiles
8f84cee9ab Add test for sk_Caps.inBlendModesFailRandomlyForAllZeroVec.
This CL also alphabetizes the various factories in ShaderCapsFactory.

Change-Id: I0378ceb821678173e72690d5563d2a9a92d90201
Bug: skia:10694, skia:10819
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324257
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-09 13:44:43 +00:00
John Stiles
658ae8fc6a Reland "Put top level FPs into their own functions"
This reverts commit a8486d10e0.

Reason for revert: several performance issues have been fixed

Original change's description:
> Revert "Revert "Revert "Put top level FPs into their own functions"""
>
> Flutter saw a substantial perf regression:
> https://github.com/flutter/flutter/issues/62447
>
> This reverts commit 7a96c2a6bb.
>
> Change-Id: Ib7d73f2df429508d85f9681eb2f0afd84917772e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307782
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

Change-Id: Ie42ff7d5aff0a95f4533a31d60eac25c83b6defa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324376
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-09 13:20:03 +00:00
Ethan Nicholas
2a4952dcce refactored more SkSL IRNodes
Change-Id: Iab04e4915715bad56b795993022b24a137339daf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324125
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-09 13:17:33 +00:00
Greg Daniel
c0d6915389 Reland "Rename GrStencilAttachment class to generic GrAttachment"
This is a reland of 6113d50ec4

Original change's description:
> Rename GrStencilAttachment class to generic GrAttachment
>
> Additional this adds a UsageFlags member to the new GrAttachment
> class.
>
> Bug: skia:10727
> Change-Id: Ifc0bfffd959f5fbc46bfcdf269e1b2a933929753
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323107
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

Bug: skia:10727
Change-Id: Ie0ff0885e01c9f0666fb0cfaa765e463dcc6d0a5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324277
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-10-09 11:59:23 +00:00
skia-autoroll
aa8c461786 Roll Chromium from af82ff2606e9 to 4a368eae5a6f (468 revisions)
af82ff2606..4a368eae5a

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 jvanverth@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: jvanverth@google.com
Change-Id: Ib54ae51abc5f617e070f89003fc1567e1718aa92
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324338
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-09 04:56:13 +00:00
skia-autoroll
df9bf325e4 Roll SwiftShader from 5f4e70b81046 to 952149303d06 (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/5f4e70b81046..952149303d06

2020-10-08 bclayton@google.com SpirvShaderDebugger: Have Function inherit LexicalBlock

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 jvanverth@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: jvanverth@google.com
Change-Id: Ic2ab37a61b7c330982bd1a38a2ccc40cfb193a68
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324339
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-09 04:55:13 +00:00
skia-autoroll
0f82612ca5 Roll Dawn from 6b4a4a85dfd7 to 793a07e36636 (12 revisions)
https://dawn.googlesource.com/dawn.git/+log/6b4a4a85dfd7..793a07e36636

2020-10-08 senorblanco@chromium.org Fix MSVC build of SerialStorage.h.
2020-10-08 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 6d6aed546061 to 4311dd05c883 (1 revision)
2020-10-08 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from f600d3aa9f26 to 6d6aed546061 (1 revision)
2020-10-08 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from c169506c9e6e to f600d3aa9f26 (1 revision)
2020-10-08 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from eb5d3e147d39 to c169506c9e6e (2 revisions)
2020-10-08 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 71d69e5ed3f4 to eb5d3e147d39 (1 revision)
2020-10-08 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 5118c0726106 to 71d69e5ed3f4 (1 revision)
2020-10-08 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 1a63c49b4e86 to 5118c0726106 (1 revision)
2020-10-08 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 007dc42cbb43 to 1a63c49b4e86 (1 revision)
2020-10-08 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from fc5c5ab60b22 to 007dc42cbb43 (1 revision)
2020-10-08 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 66377ce9be54 to fc5c5ab60b22 (1 revision)
2020-10-08 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 28ae1471bf2c to 66377ce9be54 (1 revision)

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: Ibc9050f325dc649d6d14dbf77891fec1b0478d09
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324396
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-09 04:44:03 +00:00
Jim Van Verth
2ae1dd93d8 Revert "Add sk_Caps.builtinDeterminantSupport and use it in cross()."
This reverts commit 6bbf026b54.

Reason for revert: Breaking Metal bot.

Original change's description:
> Add sk_Caps.builtinDeterminantSupport and use it in cross().
>
> This CL partially relands http://review.skia.org/321790.
>
> Change-Id: I26a1aefda8a01167783e6e7fa15a51aa35ee5d82
> Bug: skia:10819, skia:10810
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323784
> Reviewed-by: Chris Dalton <csmartdalton@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>

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

Change-Id: I4a6c1a63dc38682dd965f78f0c1da98f35b6dbad
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10819
Bug: skia:10810
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324264
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-10-09 00:12:34 +00:00
Brian Osman
1179fcf5ed Remove custom iterators from SkSL::Program
Instead, just expose the vector directly (as elements()).

Change-Id: I9f6a3ae38cd8e6f1b0a1087a42d61452fe883924
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324130
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-10-09 00:07:22 +00:00
Jim Van Verth
99b1a8b2f8 Revert "Rename GrStencilAttachment class to generic GrAttachment"
This reverts commit 6113d50ec4.

Reason for revert: Breaking MSAN bot

Original change's description:
> Rename GrStencilAttachment class to generic GrAttachment
>
> Additional this adds a UsageFlags member to the new GrAttachment
> class.
>
> Bug: skia:10727
> Change-Id: Ifc0bfffd959f5fbc46bfcdf269e1b2a933929753
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323107
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: I2ee2a1fcabd75bc24d3b7c3f76d971a3adb370a3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10727
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324276
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-10-08 23:52:34 +00:00
John Stiles
6bbf026b54 Add sk_Caps.builtinDeterminantSupport and use it in cross().
This CL partially relands http://review.skia.org/321790.

Change-Id: I26a1aefda8a01167783e6e7fa15a51aa35ee5d82
Bug: skia:10819, skia:10810
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323784
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-10-08 22:51:15 +00:00
Michael Ludwig
7d0f853158 Add SkImageFilters::Shader in place of Paint factory
SkImageFilters::Paint did not use every slot of the SkPaint, with only
its color, alpha, color filter, and shader having a meaningful effect on
the image filter result. It was always blended into a transparent dst,
so blend mode wasn't very relevant, and it was always filled to whatever
required geometry, so stroke style, path effect, and mask filters were
ignored or not well specified.

Color, alpha, and color filter can all be combined into an SkShader, so
a more constrained SkImageFilters::Shader provides the same useful
capabilities without as many surprises.

SkImageFilters::Paint still exists, but is deprecated to be removed
once I've confirmed clients aren't depending on it.

Bug: skia:9310
Change-Id: I11a82bda1a5d440726cf4e2b5bfaae4929568679
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323680
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-10-08 22:51:13 +00:00
Michael Ludwig
30378382aa Clip perspective bounds by device clip in SkPDFDevice
Bug: skia:9906
Change-Id: Ib0369e0637be2a064f4d17e0f5ae41e99883c41e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324129
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
2020-10-08 21:10:02 +00:00
Jim Van Verth
e9b9c3bd7f Revert "Merge GrContext::init into GrDirectContext ..."
This reverts commit 48d8724097.

Reason for revert: Breaking MSVC bots

Original change's description:
> Merge GrContext::init into GrDirectContext ...
>
> And minor cleanups associated with the initialization of these classes.
>
> Change-Id: Ida0372d0b1a0b8bf5b309814de5418e47ea34fdb
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324122
> Commit-Queue: Adlai Holler <adlai@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Auto-Submit: Adlai Holler <adlai@google.com>

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

Change-Id: I00b2ddaeaef53e3fe05a338c88158cf235f325c4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324132
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-10-08 21:00:36 +00:00
Jim Van Verth
4b3d1f3900 Add push constant support to GrCaps.
Change-Id: I2ef63443a68f3ebc31c7f9ad1e614b320be3e673
Bug: skia:5039
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324121
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-10-08 20:58:32 +00:00
Adlai Holler
48d8724097 Merge GrContext::init into GrDirectContext ...
And minor cleanups associated with the initialization of these classes.

Change-Id: Ida0372d0b1a0b8bf5b309814de5418e47ea34fdb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324122
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
2020-10-08 20:39:22 +00:00
Brian Salomon
f9b0042423 Expose ManagedBackendTexture from BackendTextureImageFactory.
Add helper to create self-managed BackendTexture-backed SkSurface for
tests using MBET.

GrGpu::createTestingOnlyBackendRenderTarget supports protected.

Make SkSurfaceCharacterization tests use self-managed SkSurface
factories and a use case of MakeFromBackendTextureAsRenderTarget is
removed.

Use self-managed BackendTexture-backed SkSurface factory in DM sinks and
in fm.

Bug: skia:9832

Change-Id: I0c1dc49697f8b3c942864e18b9112a3552f431ba
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323559
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-10-08 20:35:32 +00:00
Kevin Lubick
a96e080962 [canvaskit] Attempt to turn off rtti
This removes a little bit of hackery in paragraph bindings
that was needed to work around rtti and virtual methods
and embind.

Bug: skia:10794
Change-Id: I5ed15e805105bed866b9d6ebc0de1f70823d35ec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324057
Auto-Submit: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-10-08 20:21:39 +00:00
John Stiles
0743dc187a Use SkSTArray to track CFG exits instead of std<set>.
This improves SkSL compile times by about 1-2%.
Nanobench: http://screen/BL5kKgwzEzTNqSu

Change-Id: I85df42bdd33cfce13345f11d588283eeaf5643d0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324061
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>
2020-10-08 20:08:12 +00:00
Ethan Nicholas
e17b050196 add missing <atomic> include
TBR=brianosman@google.com, johnstiles@google.com

Change-Id: I03f771b39acbeba3d25da97d759ad2f9a8f6f5d3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324123
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-08 19:43:12 +00:00
Greg Daniel
6113d50ec4 Rename GrStencilAttachment class to generic GrAttachment
Additional this adds a UsageFlags member to the new GrAttachment
class.

Bug: skia:10727
Change-Id: Ifc0bfffd959f5fbc46bfcdf269e1b2a933929753
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323107
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-10-08 19:40:32 +00:00
Julia Lavrova
69f3cab837 Changing the way we select a grapheme
Selecting only graphemes that are fully inside the
[start:end) range. Hopefully, it's a temporary
solution to simplify SkParagraph vs TxtLib comparison.

Change-Id: Iebc74fb4ae20c232bfae762a04e45f0979cf6236
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322438
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2020-10-08 19:02:12 +00:00
John Stiles
e1589a1e19 Add line breaks to make dehydrated files more merge-friendly.
Change-Id: Ica329608e5ee7f873a55dc27e6c14bb8734665a3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324118
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>
2020-10-08 18:55:02 +00:00
Stephen White
e895cdc716 Dawn: implement mipmap generation.
Dawn does not support automatic mipmap generation, so use mip-to-mip
downsampling.

Change-Id: I71e1808d78f45eee68df7f124100f5b563f29da3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319736
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Stephen White <senorblanco@google.com>
2020-10-08 18:50:02 +00:00
Adlai Holler
1fc76ce6ff Migrate more Android & SkSurface API off GrContext
Migration should be free because (1) the non-Android API is
only loosening up to GrRecordingContext and (2) the Android API
can only see GrContext through including GrDirectContext.h

Change-Id: I97aa75baba0b0969361db6eaef9f83ea94183700
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323557
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-10-08 18:32:32 +00:00
Kevin Lubick
adbd312a46 Fix debugger to work with new emsdk
Change-Id: I53fcf34e42604322f9e285de2bae4e37ccc60f6d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324120
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-10-08 18:08:06 +00:00
Michael Ludwig
a1d668d24c Adjust w0 clipping plane distance
Confirmed that this avoided the too-aggressive clipping on the web pages
linked in chromium:1136046 and chromium:1128636

Bug: skia:9906
Change-Id: Id34233b8d7fc76bd80b43d3112c5073b240e6109
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323980
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-10-08 17:54:32 +00:00
Robert Phillips
d464feb1fc Rename GrThreadSafeUniquelyKeyedProxyViewCache
Once triangulated paths are added this will no longer just be storing proxy views.

Bug: 1108408
Change-Id: I82fa47b0b85f738d9a25330c29bc2892c9bfeda4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323999
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-10-08 17:39:12 +00:00
Kevin Lubick
2c08814f36 [pathkit] update to build with emsdk 2.0.6
Change-Id: I8df13d592abcd7e2b396250293b57037d2b4b774
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324117
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-10-08 17:26:32 +00:00
Ethan Nicholas
01ec7e8ec7 moved SkSL Setting data into IRNode and fixed its dehydration/rehydration
Change-Id: Ide129334989890961a46681129672682cf826915
Bug: skia:10819
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323978
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-10-08 17:23:47 +00:00
Mike Klein
ba835bba45 tidy up SkTHash special methods
Like the destructors, most of these can just go unspoken.

SkTArray only knows its size in Debug builds, so it can't easily grow a
copy constructor.  Instead just keep the explicit copies and moves on
SkTHashTable, and mark the others as explicitly default.  I inverted the
pattern from assign-by-copy to copy-by-assign, but it's all basically
the same.

Change-Id: I0df552ef547ce9c7e232267c072a5f3b09197847
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324056
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-10-08 17:20:22 +00:00
John Stiles
796cdb7839 Use SkTHashMap to implement DefinitionMap.
The benchmarks show a negligible performance decrease over the bespoke
TinyUnorderedMap class, but it's well within the margin of error, and
a real hash map will scale better in pathological cases.

Nanobench: http://screen/537ETJivpGdVJpk

Change-Id: I21279c47742a5dac81d57c7e9f7da4bfc595fdc9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323114
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-10-08 17:18:42 +00:00
Ethan Nicholas
ed84b73797 moved SkSL FunctionDeclaration data into IRNode
Change-Id: I97a59563914c4f75f8cfdc2bd5a9ae430de9bb3c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323881
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-10-08 17:10:12 +00:00
Kevin Lubick
9eaca48f46 [canvaskit] Update emsdk to 2.0.6
Of note, I had to explicitly export _malloc and _free, since
we use those directly in the binding layer.

Code size change:
 -20k on JS (-1k compressed)
 -21k on WASM (-15k compressed)

Bug: skia:10419, skia:10794
Change-Id: Id7670b6fcbf1524ad3155a863db51eb49aa24811
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323979
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-10-08 16:38:10 +00:00
John Stiles
9c0b79a354 Implement assignment and copy-construction for SkTHashSet/Map.
This will enable us to use SkTHashMap to store our definition maps.

Change-Id: I6017dfa71e1c5e68a20c97e955bb3d3abf347f0d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323891
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-08 16:05:52 +00:00
Kevin Lubick
0039874105 [canvaskit] POC bindings for testing gms
In this CL, I forked compile.sh and created a new gm_bindings.cpp.
I also moved viewer.html into wasm_tools and created a gmtests.html
for testing out the bindings locally.

Right now there is only one gm file compiled in. I plan in a followup
CL to have some way to generate the list of cpp files that need to
be compiled in from gms.gni. I was unable to get it to work with
simply linking the lib_gm.gni, probably due to the same issue with
Registry that csmartdalton@ ran into when adding viewer.html
and the associated bindings.

Suggested reviewing order:
 - gmtests.html to get a sense of how the test flow works.
 - gm_bindings.cpp to make sure I setup the contexts/GMs correctly.
 - compile_gm.sh to see how the gms are compiled in.
 - The remaining files in any order.

When I tested this locally, the bleed_downscale digest was
exactly the same (pixel for pixel, byte for byte) as a known
digest in Gold, so I'm fairly confident in how things work.

Change-Id: I2babef848ca60f7db74e4adf27b8952a66bdeee1
Bug: skia:10812
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322956
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2020-10-08 16:03:08 +00:00
Ethan Nicholas
7868692b9d Moved SkSL VariableReference data into IRNode
As part of this change, broke up IRNode::type() and moved it into
virtual functions where it belongs.

Change-Id: Ib19e99f2e8392e34a20a1887b980225ac4b793f7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323884
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-08 15:59:08 +00:00
Brian Osman
e3dcb1392d Remove inherited program element list (it's now unused)
Change-Id: I82d4aaf442be262ad8e397de4f820831f4797b95
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323977
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-10-08 15:52:09 +00:00
Brian Osman
afa18eeb9a Put interface blocks into the intrinsic maps, too
We now support cloning global variables that are "declared" by an
InterfaceBlock, or a GlocalVarDeclaration. At this point, there are no
"inherited" elements - any mutable data that starts out owned by the
pre-includes is cloned.

Follow-up will remove the inherited element list entirely - splitting
this out to make the changes clearer.

Bug: skia:10589
Change-Id: I2a95c73bf53db313e9f3467c681a05dffffeaa3a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323976
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-10-08 15:20:28 +00:00
John Stiles
99aa05339d Remove unused copy of DefinitionMap.
This appears to just be dead code.

Change-Id: I2a8510f2e8c15a833af72552a13c2a893b3b123a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323925
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>
2020-10-08 15:13:58 +00:00
Kevin Lubick
13c3633f84 [canvaskit] Update quickstart to use 0.19.0
This also links the main canvaskit landing page to the quickstart
and both pages to the Typescript types and documentation.

Bug: skia:10717
Change-Id: I843639651aa04e48bb13f995c15e4ee18fb348bd
No-Try: true
Docs-Preview: https://skia.org/?cl=323889
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323889
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2020-10-08 15:12:08 +00:00
Brian Osman
6a204db32c Change interface block's fVariable from ref to pointer
The next pre-include refactor will require cloning InterfaceBlocks, and
re-targeting the variable.

Change-Id: Iccfc1f39789fcd572199682386cd612500334061
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323890
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-10-08 14:14:39 +00:00
Ethan Nicholas
dd21816b00 moved SkSL Ternary data into IRNode
Change-Id: I70e63aaa73082024c8f0887a941d54cfd12aa2b6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323883
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-08 14:06:18 +00:00
Ethan Nicholas
8c44ecae4f moved SkSL If data into IRNode
Change-Id: Icccc14019ae5c87a09c8439fa1b1ae324b8e32bf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323777
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-08 14:05:38 +00:00
Ethan Nicholas
1e9f7f36f7 changed various SkSL structs into classes
The goal is to have all of the IR structs be classes when the
rearchitecture is complete. Some of these should have been changed in
earlier CLs, and some of them never contained any data in the first
place and thus won't be affected by the rearchitecture.

Change-Id: Id5a3cebffd59a4c43b79f2195b50106ede7c2f87
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323882
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-08 13:53:18 +00:00
John Stiles
b8cc665ffe Remove dedicated name from SymbolTable entries.
We now assume that the Symbol's name() is its actual name, instead of
having it passed it in by the caller. This simplifies calling code, and
also removes redundant symbol names from the Dehydrator, saving a few
hundred bytes here and there.

Change-Id: I3e3d65b238ea58ab52f5dca205458d6f45c06c3d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323110
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-08 13:52:58 +00:00
Robert Phillips
fde67e4997 Add HW-filtered masks to thread-safe cache
Bug: 1108408
Change-Id: Iace1cea1c79a1f505a5b4da3a4d4c1a713e142ba
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323505
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-10-08 13:03:18 +00:00