Commit Graph

51489 Commits

Author SHA1 Message Date
Chris Dalton
418eda2c59 Slightly improve cubic chop precision in stroke tessellation shaders
Also adds GrGLSLVertexGeoBuilder::appendRawFunctionDefinition(). This
allows us to define functions in vertex and geometry shaders whose names
don't get mangled.

Bug: skia:10419
Change-Id: I90319b54bcbbb7000c7809cb6ce8d1969a3bd8c5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327456
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-10-16 17:44:31 +00:00
Michael Ludwig
fd0b15801f Visualize perspective scaling in filter bounds sample
Bug: skia:9074
Change-Id: Icdac64276e0a403950fd990a619d523b0ee784de
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326942
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-10-16 17:11:01 +00:00
Ben Wagner
712d3a57e8 Cannot create SkFontData with no data.
Bug: oss-fuzz:26254
Change-Id: Ia4ce4eabacbd9811bc0fdf09b509fd69650cce53
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327816
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-10-16 16:48:41 +00:00
Julia Lavrova
36700ef54d ICU project: script iterator in SkShaper
Change-Id: Idcc9290a7666cb590532150a44304d704c8ee34c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319777
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2020-10-16 16:08:12 +00:00
Florin Malita
da34798bee Cleanup gn_to_bp_utils
Don't skip deps from modules/.  The initial exclusion was added long
ago, when Skottie deps were causing build issues.

Now it doesn't seem to be needed anymore, and it actually gets in the
way (see exceptions for various modules).

Change-Id: Ibb944fc5ab4754bf4006ebb3b75d9d8e5e0d8312
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327620
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2020-10-16 16:01:32 +00:00
Brian Salomon
6c11ba2334 fix always true comparison in assert
Bug: skia:10632
Change-Id: I271875a73b7e80a3ef5ea357eab7c8165440e7a9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327718
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-10-16 15:54:02 +00:00
Mike Klein
a0c6731b12 update SkTPin()
- Reword the comment to explain how it differs from std::clamp().
 - Document and test an alternative form using std::{min,max}.

Change-Id: I3a97b98a15303478a5a7ff8d0536829f6d5f1586
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327696
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-10-16 15:50:32 +00:00
Brian Salomon
7db7139f40 Revert "Revert "Move all YUVA image creation in GMs into sk_gpu_test::LazyYUVImage.""
This reverts commit 839fb228ac.

Cq-Include-Trybots: luci.skia.skia.primary:Build-Debian10-Clang-arm-Debug-Chromebook_GLES
Bug: skia:10632
Change-Id: I7c9fc21f03dfd0537fed6074e550dd8a500a12b9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327623
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-10-16 14:58:13 +00:00
Tyler Denniston
acafbe8721 Reland "Add subset of W3C test suite to SVG corpus"
This reverts commit 7767a269f8.

Reason for revert: removing bad SVGs from parse tests

Original change's description:
> Revert "Add subset of W3C test suite to SVG corpus"
>
> This reverts commit f761a8c1e5.
>
> Reason for revert: breaking some CPU bots due to parse errors
>
> Original change's description:
> > Add subset of W3C test suite to SVG corpus
> >
> > Bug: skia:10845
> > Change-Id: I5a98f4f50f3f507b01d847464d21926705134354
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327199
> > Auto-Submit: Tyler Denniston <tdenniston@google.com>
> > Commit-Queue: Tyler Denniston <tdenniston@google.com>
> > Reviewed-by: Kevin Lubick <kjlubick@google.com>
> > Reviewed-by: Florin Malita <fmalita@chromium.org>
> > Reviewed-by: Ravi Mistry <rmistry@google.com>
>
> TBR=rmistry@google.com,kjlubick@google.com,fmalita@chromium.org,fmalita@google.com,tdenniston@google.com
>
> Change-Id: I0235f43b512c0f3baa0cd069479712cf885a14b9
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:10845
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327377
> Reviewed-by: Tyler Denniston <tdenniston@google.com>
> Commit-Queue: Tyler Denniston <tdenniston@google.com>

TBR=rmistry@google.com,kjlubick@google.com,fmalita@chromium.org,fmalita@google.com,tdenniston@google.com

# Not skipping CQ checks because this is a reland.

Bug: skia:10845
Change-Id: If55b984e47712ee8e4ff84bf691c1dce997f17c3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327621
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2020-10-16 14:54:43 +00:00
Brian Salomon
839fb228ac Revert "Move all YUVA image creation in GMs into sk_gpu_test::LazyYUVImage."
This reverts commit db0288d747.

Reason for revert: undeclared tuple size

Original change's description:
> Move all YUVA image creation in GMs into sk_gpu_test::LazyYUVImage.
>
> LazyYUVImage now supports making images from a generator and from
> textures. It uses ManagedBackendTexture to manage texture plane
> lifetime via ref-counting.
>
> Adds some supporting utility functions to SkYUVAInfo and
> SkYUVAPixmaps.
>
> Eases transition of forthcoming MakeFromYUVATextures API change.
>
> Bug: skia:10632
>
> Change-Id: I8cfd747c27076d1627da6ea8a169e554a96049e0
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326720
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: Icdfb70f7dadd97eace8f88d5a886d31534102f5f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10632
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327622
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-10-16 13:37:43 +00:00
Brian Salomon
db0288d747 Move all YUVA image creation in GMs into sk_gpu_test::LazyYUVImage.
LazyYUVImage now supports making images from a generator and from
textures. It uses ManagedBackendTexture to manage texture plane
lifetime via ref-counting.

Adds some supporting utility functions to SkYUVAInfo and
SkYUVAPixmaps.

Eases transition of forthcoming MakeFromYUVATextures API change.

Bug: skia:10632

Change-Id: I8cfd747c27076d1627da6ea8a169e554a96049e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326720
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-10-16 13:19:01 +00:00
Brian Salomon
1131b659f6 Reenable circle blur fast path for ellipse that transforms to circle
Bug: chromium:1132617
Change-Id: Id9ecc22dfd1720195e0753cfc2b0897fe09dc2ae
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327378
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-10-16 13:18:53 +00:00
skia-autoroll
fd74ac6498 Roll SwiftShader from 52c1a859d9eb to 04bd4d8e4ece (2 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/52c1a859d9eb..04bd4d8e4ece

2020-10-15 amaiorano@google.com Add unit tests for arithmetic ops with constant args
2020-10-15 eholk@chromium.org Handle mul instructions with two immediates on x86-32 and x86-64

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: I630144d9c2e4fc40e1b0a5bf2e90813b0c290169
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327503
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-16 04:53:41 +00:00
skia-autoroll
68e6421605 Roll Chromium from 37c343f01f2b to 17855e1b657e (436 revisions)
37c343f01f..17855e1b65

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: I2cab87524c896f850f0fc9dbb971fc22a1e1335e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327502
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-16 04:49:02 +00:00
skia-autoroll
c35d6239b3 Roll Dawn from 84b70a6e4d93 to b1938273e405 (13 revisions)
https://dawn.googlesource.com/dawn.git/+log/84b70a6e4d93..b1938273e405

2020-10-16 enga@chromium.org Revert "Replace the wire serializer with a no-op impl on disconnect"
2020-10-16 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 95dc655bf8a6 to 89042538376b (1 revision)
2020-10-15 brandon1.jones@intel.com Allow Clearing Integer Formats To Large Values
2020-10-15 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 481ecff293db to 95dc655bf8a6 (1 revision)
2020-10-15 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 53380f9ed76f to 481ecff293db (1 revision)
2020-10-15 cwallez@chromium.org Fix a small typo in Format.cpp alwaus -> always
2020-10-15 brandon1.jones@intel.com Change Device::Tick To Return Bool
2020-10-15 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from ff267ca60e14 to 53380f9ed76f (1 revision)
2020-10-15 enga@chromium.org Replace the wire serializer with a no-op impl on disconnect
2020-10-15 cwallez@chromium.org Make dawn_use_x11 = use_x11 when building inside Chromium
2020-10-15 cwallez@chromium.org ShaderModule: Don't use Format::Type for reflection.
2020-10-15 cwallez@chromium.org TextureView: only store the Aspect as a bitfield.
2020-10-15 cwallez@chromium.org Format: Move the TexelBlockInfo inside an AspectInfo.

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 enga@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: enga@google.com
Change-Id: I3b70d834d2492d82b2f198a74eba96ee03205ea5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327501
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-16 04:45:01 +00:00
skia-autoroll
b871548b90 Roll ANGLE from a2ef814426ee to b4fb7cc9ec8f (15 revisions)
a2ef814426..b4fb7cc9ec

2020-10-16 jmadill@chromium.org Test Runner: Print reproduction steps on a batch failure.
2020-10-16 jmadill@chromium.org Add priority to trigger.py jobs.
2020-10-16 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Headers from 94ff600cc862 to 04306fa5d673 (2 revisions)
2020-10-16 jmadill@chromium.org Perf tests: remove redundant null naming.
2020-10-15 syoussefi@chromium.org Vulkan: Fold deferred clears into current clears
2020-10-15 jonahr@google.com GLX, EGL: Support NV_robustness_video_memory_purge
2020-10-15 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from 465acf564a41 to 7d11021098f2 (2 revisions)
2020-10-15 geofflang@google.com Cache BlitGL initialization state with a single bool.
2020-10-15 j.vigil@samsung.com EGL: Entrypoint and autogen for EGL_KHR_reusable_sync
2020-10-15 courtneygo@google.com Vulkan: Remove serial from RenderPassHelper
2020-10-15 lehoangq@gmail.com Metal: Use MipmapNativeLevel class to store native mip lvl
2020-10-15 jmadill@chromium.org GLES/GL/Win: Suppress all constancy samples tests.
2020-10-15 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from e72c6099f946 to 52c1a859d9eb (3 revisions)
2020-10-15 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from f121d1252b2a to 465acf564a41 (2 revisions)
2020-10-15 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 20d60a8527d7 to 312a2b1c9d05 (473 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
Test: Test: angle_deqp_egl_tests
Change-Id: Iaa8a81e13083dd1b60189b31ff7356721abc99d1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327500
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-16 04:42:31 +00:00
Florin Malita
b3418103e9 Reland "[svg] Relocate out of experimental"
Move the SVG rendering code to modules/svg, and componentize.
Also split into include/src/utils.

As external clients still reference the old header locations,
introduce temporary forwarding headers to facilitate the migration.

This reverts commit d6cf56fd34.

TBR=

Change-Id: Ibadd7c8dc0464ec0c27841530ade0c2098305d20
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327344
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Florin Malita <fmalita@google.com>
2020-10-16 02:32:41 +00:00
Jorge Betancourt
f1b53836b7 handle updateAnimationSurface in SkottieView through GL thread
Change-Id: I546a095e340821b11310cec521e476c7ace28e3c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326536
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2020-10-15 21:45:57 +00:00
Tyler Denniston
7767a269f8 Revert "Add subset of W3C test suite to SVG corpus"
This reverts commit f761a8c1e5.

Reason for revert: breaking some CPU bots due to parse errors

Original change's description:
> Add subset of W3C test suite to SVG corpus
>
> Bug: skia:10845
> Change-Id: I5a98f4f50f3f507b01d847464d21926705134354
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327199
> Auto-Submit: Tyler Denniston <tdenniston@google.com>
> Commit-Queue: Tyler Denniston <tdenniston@google.com>
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Ravi Mistry <rmistry@google.com>

TBR=rmistry@google.com,kjlubick@google.com,fmalita@chromium.org,fmalita@google.com,tdenniston@google.com

Change-Id: I0235f43b512c0f3baa0cd069479712cf885a14b9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10845
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327377
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2020-10-15 21:13:49 +00:00
Mike Reed
f1f1e7dd36 Hide shrinkToFit -- not needed now that we have pathbuilder
Step one is to make it private -- only skottie needs it at the moment
Stpe two is to modify pathops to use builders, and then we can likely
remove it shrinkToFit entirely (since builder.snapshot() is already snug).

bug: skia:9000

Change-Id: I9126bcb6fc2094fbeede2acb1f211b0ab771feba
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327341
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2020-10-15 19:47:06 +00:00
Tyler Denniston
f761a8c1e5 Add subset of W3C test suite to SVG corpus
Bug: skia:10845
Change-Id: I5a98f4f50f3f507b01d847464d21926705134354
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327199
Auto-Submit: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Ravi Mistry <rmistry@google.com>
2020-10-15 19:27:56 +00:00
Julia Lavrova
1b44330169 Placeholder at the end of the text right before \n.
Bug: skia:10838
Change-Id: I0f6ebe442d67ba4c91cbef4fcaec6dea02739d34
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327339
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2020-10-15 19:15:16 +00:00
Robert Phillips
d6cf56fd34 Revert "[svg] Relocate out of experimental"
This reverts commit 6fc4106a9d.

Reason for revert: Blocking the Android roll

Original change's description:
> [svg] Relocate out of experimental
>
> Move the SVG rendering code to modules/svg, and componentize.
> Also split into include/src/utils.
>
> As external clients still reference the old header locations,
> introduce temporary forwarding headers to facilitate the migration.
>
> Change-Id: Ib289dbdcd80c16a01c47805e7242f2e08bebc165
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326948
> Reviewed-by: Tyler Denniston <tdenniston@google.com>
> Commit-Queue: Florin Malita <fmalita@google.com>

TBR=fmalita@chromium.org,fmalita@google.com,tdenniston@google.com

Change-Id: I386cf77a15a9e1d392029804abaf937dae53f435
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327342
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-10-15 18:54:18 +00:00
John Stiles
ede793a1af Increase stack trace depth from 64 to 128.
64 stack frames is not deep enough when destroying an SkSL program:
http://screen/4RFxPFj7TFXRcTF

Change-Id: I53b151a640a982af7864a17ef0381e231e3fb872
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327338
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-10-15 18:20:46 +00:00
Mike Klein
ec64d037bd cond_stack/mask_stack for CPU backend
This is enough to let the next runtimecolorfilter filter draw.

Mostly this just apes the cond/mask stacks from SkSLByteCode.cpp.

The point of most interest is that we can skip forward kBranchIfAllFalse
if we make our side effects (stores) conditional.

My reasoning here is that a forward branch-if-all-false instruction must
always be a performance optimization only; it's always got to be safe to
not take the branch, as one of your lanes could very well not be false.

Change-Id: I90dda02489b0de4ee91477a4eb7fe14aeb5c555e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327276
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-10-15 17:35:36 +00:00
Kevin Lubick
162d757c3a [canvaskit] Expose Perlin Noise shaders.
Change-Id: I2515efb06dd1a2b02f71922503462572eea0f346
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327197
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-10-15 17:10:00 +00:00
Kevin Lubick
421ba88d15 [canvaskit] Clean up Shader docs/types/names
There should be no functional changes.

I also address some forgotten changes to canvaskit-wasm-tests.ts
from CLs last week.

Bug: skia:10717
Change-Id: If02f60813af0aa42acd637639e40f4d6d0b38bd7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327157
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2020-10-15 17:09:24 +00:00
Adlai Holler
1a364272be Migrate debugger & canvaskit to GrDirectContext
Change-Id: I57e0b28da89870cd9c7708283b64613368008c54
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327158
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-10-15 16:07:06 +00:00
Brian Salomon
5b67c4d136 Ref GrDirectContext in MakeBackendRenderTargetSurface
Fixes crashes when running vkbert config where we tear down a Vulkan
GrDirectContext before deleting the backing store of a SkSurface
created via MakeBackendRenderTargetSurface.

Bug: skia:10843
Change-Id: I99ea2266ba14325d3aaac5ee59aa712688fb9329
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327196
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-10-15 15:40:56 +00:00
Ethan Nicholas
eaf4788a75 moved SkSL InterfaceBlock data into IRNode
Change-Id: If85369d978e395502b2169d605c2513a9086b57e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326916
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-10-15 15:20:06 +00:00
Robert Phillips
41fc174d79 Restore cpu execution of async* GMs
Change-Id: Ia0de701ab0aaae4ee6d7631f6df95bf3296f9bdf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327177
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-10-15 15:01:18 +00:00
Florin Malita
6fc4106a9d [svg] Relocate out of experimental
Move the SVG rendering code to modules/svg, and componentize.
Also split into include/src/utils.

As external clients still reference the old header locations,
introduce temporary forwarding headers to facilitate the migration.

Change-Id: Ib289dbdcd80c16a01c47805e7242f2e08bebc165
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326948
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2020-10-15 14:36:06 +00:00
Adlai Holler
dd09d6e2ef Migrate skottiekit to GrDirectContext
Change-Id: I6767070f63ba19a61ac6766254b9e524b7bbc8a3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326901
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2020-10-15 13:27:16 +00:00
skia-autoroll
e07f2b2191 Roll SwiftShader from e72c6099f946 to 52c1a859d9eb (3 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/e72c6099f946..52c1a859d9eb

2020-10-14 natsu@google.com Revert "Revert "Update virlg_hw path to reflect Minigbm""
2020-10-14 sugoi@google.com Fix CommandPool memory management
2020-10-14 bclayton@google.com SpirvShaderDebugger: Improve stepping for inlined functions

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: I1daede2bd6132091f7b417217de10f931766d83f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327031
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-15 05:05:13 +00:00
skia-autoroll
bf60c16d17 Roll ANGLE from bd0d3f9c4ff8 to a2ef814426ee (22 revisions)
bd0d3f9c4f..a2ef814426

2020-10-14 lexa.knyazev@gmail.com Vulkan: fix undefined right shift in GetMask
2020-10-14 timvp@google.com Revert "Vulkan: Disable UNASSIGNED-CoreValidation-DevLimit-MissingQueryCount"
2020-10-14 kbr@chromium.org Populate LevelInfoGL's format/internalFormat in eglBindTexImage.
2020-10-14 timvp@google.com Vulkan: Support dumping VMA stats string
2020-10-14 jmadill@chromium.org Skip slow GLES 1 Win/Intel/Vulkan test.
2020-10-14 b.schade@samsung.com Add GL_EXT_copy_image extension entry points
2020-10-14 bsheedy@chromium.org Disable more ARM-based Mac tests
2020-10-14 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from c2553a315f5c to 5c64374dd6cb (5 revisions)
2020-10-14 timvp@google.com Revert "Vulkan: Disable vkCreateDevice-physical-device-features-not-retrieved"
2020-10-14 courtneygo@google.com Vulkan: refactor error info
2020-10-14 jmadill@chromium.org Skip slow EGL Vulkan Linux tests.
2020-10-14 jmadill@chromium.org Fail 3 tests on Android GLES N5X.
2020-10-14 ianelliott@google.com Reimplement WindowSurfaceVk::checkForOutOfDateSwapchain
2020-10-14 syoussefi@chromium.org Vulkan: loadOp=DONT_CARE + unused D/S => invalidate D/S
2020-10-14 jmadill@chromium.org Skip two more FBO max samples tests on Win/NV/GL.
2020-10-14 hckim.kim@samsung.com Vulkan: Support OES_texture_cube_map_array extension
2020-10-14 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from 9d4b40ae645e to f121d1252b2a (1 revision)
2020-10-14 jonahr@google.com GLX: Workaround to disable GLX_OML_sync_control support.
2020-10-14 ianelliott@google.com Reimplement WindowSurfaceVkAndroid::getCurrentWindowSize()
2020-10-14 jmadill@chromium.org Tests: Use script type in isolate map.
2020-10-14 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from a6b7134c40b1 to 20d60a8527d7 (447 revisions)
2020-10-14 syoussefi@chromium.org Vulkan: Fix vector size issue with clearWithCommand

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: Manual verificationTest: Test: dEQP-GLES31.functional.fbo.color.texcubearray.*
Change-Id: I5581d3453a8ecaba9247d7a30f3bcb64242d8919
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327029
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-15 05:05:03 +00:00
skia-autoroll
324abbd44f Roll Dawn from cac0442277f7 to 84b70a6e4d93 (4 revisions)
https://dawn.googlesource.com/dawn.git/+log/cac0442277f7..84b70a6e4d93

2020-10-14 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from f2b8b6e87396 to ff267ca60e14 (2 revisions)
2020-10-14 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 435916e544cc to f2b8b6e87396 (1 revision)
2020-10-14 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 4311dd05c883 to 435916e544cc (1 revision)
2020-10-14 cwallez@chromium.org dawn.json: Expose the driver version in the adapter.

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 enga@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: enga@google.com
Change-Id: I63243c871d9c81b31c542ec017779a6e0df538cd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327030
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-15 04:59:13 +00:00
skia-autoroll
9ec53caf5e Roll Chromium from 7cb4c97a5eda to 37c343f01f2b (470 revisions)
7cb4c97a5e..37c343f01f

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: I4347a2155d21c0cfa13c1fbe73742ecff6c20c08
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327028
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-15 04:59:03 +00:00
Mike Klein
a0f5452c6e split that new filter into smaller steps
Looks best to tackle the early return and if statements separately.

Change-Id: I4ad0d4c8e7707277d678e1219534d20e0e54ba1c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327017
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-10-14 22:54:02 +00:00
John Stiles
f4bda743ff Rename SkTArray::reserve to reserve_back.
The semantics of `vector::reserve` and `SkTArray::reserve` were not the
same. SkTArray::reserve takes a delta over the current array size,
whereas vector takes a total array size. This could lead to subtle
errors with over- or under-reservation, hurting performance.

This CL renames `SkTArray::reserve` to `SkTArray::reserve_back` to give
the SkTArray behavior a distinct (hopefully easily understandable) name,
leaving its functionality as-is.

Change-Id: Icbd3114bb317fd5f307f393c02ae6fb6f83764e9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326956
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-10-14 21:42:11 +00:00
Michael Ludwig
6aaecfb7f7 Update image filter debug samples to use new APIs
For clarity, this renames skif::Mapping::Make to skif::Mapping::DecomposeCTM
to really emphasize when it should be used over just a constructor.

Renames SampleBackdropBounds to SampleFilterBounds since the operations and
coordinate spaces that it visualizes are the same for regular or backdrop
filtering (we just swap the notion of src and dst devices, really).
Technically, this is not quite true yet since regular filtering modifies the
DAG with a matrix transform right now, but that's going away soon (tm).

The "new" SampleFilterBounds example is updated to use the new bounds APIs
that use the coord-space safe types in the skif namespace. It also visualizes
a filter, and simplifies some of the bounds being drawn and reported to
only those most interesting.

The SampleImageFilterDAG has been updated to match the soon-to-be state
of how SkCanvas processes regular image filters for a saveLayer. All
implicit matrix-transform node code is removed. The bounds calculation
code is similarly updated to use the new 'skif' types and functions. To
simplify the visualization of each node, the 'isolated' versions of the
bounds were dropped.

Bug: skia:9282, skia:9283
Change-Id: If2ad2c302e5165ae009bba93cea52bf0566a543a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326718
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-10-14 20:45:41 +00:00
Mike Reed
c924a88e33 SkPath::shrinkToFit() needs to perform copy-on-write
When we shrink a path, we might relocate its underlying arrays.
Doing so would invalidate any outstanding Iterators. The caller must
handle this for its path object, but there may be copies elsewhere,
which have just ref'd the underlying arrays. To keep these copys'
iterators alive, we defensively "copy-on-write", so as to not relocate
their buffers.

Incidentally, update SkContourMeasureIter's constructor to clarify that
it is iterating through its copy of the path, and not the original.

Change-Id: I5c9331ab36ac8e156218532478f6d7105fd97cdc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326438
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2020-10-14 20:24:11 +00:00
Derek Sollenberger
acb63208ca Enable AHB Surfaces with protected context for OpenGL
Bug: b/168500121
Change-Id: Iecc92571a3bb72dcf296fc93d4a20909b8091b0c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326949
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2020-10-14 20:19:21 +00:00
Mike Klein
7485ffc611 slightly more complex runtime color filter GM
This adds a runtime color filter with about the same control flow
complexity as Android's tone mapping.  As expected failing on 8888:

    error: 11: return not allowed inside conditional or loop

Incidentally, is there no `const` in sksl?  I made color and luma const
out of habit but got GL/Metal compilation errors (but not sksl ones as
far as I can tell).

Change-Id: Ic4370c068a27349a7f5ab64ecf5ddbb34e91d8f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326909
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-10-14 19:57:41 +00:00
Adlai Holler
3b12470379 Fix generated files
Cq-Include-Trybots: luci.skia.skia.primary:Housekeeper-PerCommit-CheckGeneratedFiles
Change-Id: Ic57247bd044c08140a8392645703e479fe1829ea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326903
Commit-Queue: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-10-14 19:12:01 +00:00
Ethan Nicholas
0a5d096eeb moved SkSL FunctionDefinition data into IRNode
Change-Id: Ia828de0793ee66301ba315f4593b4d7d69222b4e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326717
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-14 18:53:41 +00:00
Robert Phillips
3172208ad0 Revert "Remove GrContext"
This reverts commit 2edf18d818.

Reason for revert: breaking wasm-debugger

Original change's description:
> Remove GrContext
>
> Woo!
>
> Change-Id: Ifa3ff7e79c7048c2f1d808cc9705593d72886f08
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326436
> Auto-Submit: Adlai Holler <adlai@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: Ie05bda5dad7fb5d369ebe579d2e009fdb99c0729
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326941
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-10-14 18:30:13 +00:00
Chris Dalton
34ddcb84f3 Convert GrWangsFormula to skvx
Change-Id: Ibd26204033aa3f6a8ea13be23926b1541a41c621
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324737
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-10-14 17:57:42 +00:00
Adlai Holler
2edf18d818 Remove GrContext
Woo!

Change-Id: Ifa3ff7e79c7048c2f1d808cc9705593d72886f08
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326436
Auto-Submit: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-10-14 17:47:31 +00:00
Robert Phillips
52ace08ef8 Fix special case in SkRRect::setOval where the oval devolves to a rect
Bug:1119593
Change-Id: I6c25c54840f44b5143e40b4ec5da403a737e9d1c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326441
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-10-14 17:44:51 +00:00
Robert Phillips
6ffcb23435 Pull the triangulating path renderer's unique key creation into a sub-routine
We will need to be a bit more flexible wrt making this key if the
triangulated path is to be stored in the thread-safe cache.

Bug: 1108408
Change-Id: I5aeae60fb8e542152cc75ea5244b324f05c4fb04
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/326836
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-10-14 17:42:16 +00:00