Commit Graph

54821 Commits

Author SHA1 Message Date
Chris Dalton
82007f568d Implement a fixed count stroke tessellator
This new tessellator renders strokes as fixed-count triangle strip
instances. Any extra triangles not needed by the instance are emitted
as degenerate triangles. Since it draws in order, this tessellator
allows us to batch dynamic colors even when hw tessellation is not
supported.

Bug: skia:10419
Change-Id: If03a8b76319471ae4d4580dda019b69204d9197b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398416
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-04-22 20:34:04 +00:00
Chris Dalton
57ab06c14e Delete mixed samples
Mixed samples is no longer relevant for Ganesh. DMSAA and the new
Ganesh architecture both rely on full MSAA, and any platform where
mixed samples is supported will ultimately not use the old
architecture.

Change-Id: I5acc745010e090ef26310d92ec6240be2cd494cf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399837
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-04-22 20:11:34 +00:00
John Stiles
47b48bc2be Reland "Add support for uniforms and layout(key)s to DSLCPPCodeGenerator."
This reverts commit 289da86e37.

Reason for revert: relanding

Original change's description:
> Revert "Add support for uniforms and layout(key)s to DSLCPPCodeGenerator."
>
> This reverts commit f33b061e3b.
>
> Reason for revert: Google3 roll and wasm build
>
> Original change's description:
> > Add support for uniforms and layout(key)s to DSLCPPCodeGenerator.
> >
> > Change-Id: I77c386e3d72fb4a5986e5efb8bc9d409200534d1
> > Bug: skia:11854
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398457
> > Commit-Queue: John Stiles <johnstiles@google.com>
> > Auto-Submit: John Stiles <johnstiles@google.com>
> > Reviewed-by: Brian Osman <brianosman@google.com>
>
> TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com
>
> Change-Id: I006ece639fa6051ff6ef1c496e648db9d5d0b30a
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:11854
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399498
> Reviewed-by: John Stiles <johnstiles@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>


Bug: skia:11854
Change-Id: I1a4a4db471e2ad0b169b2b77784ca17e6286fbd2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/400036
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-04-22 20:04:32 +00:00
John Stiles
956802335d Reland "Reland "Implement statements and expressions in DSL C++ code generator.""
This is a reland of c412688798

This CL lands the code changes but not the dm test, which is causing
link errors. Tests will be relanded as a separate CL, at
http://review.skia.org/400097

Original change's description:
> Reland "Implement statements and expressions in DSL C++ code generator."
>
> This is a reland of 16cbfb41df
>
> Tests now rely on `shaderDerivativeSupport` and `integerSupport` as
> proxies to indicate ES3 support. The SwitchStatement test has been
> adjusted to hopefully confuse fewer compilers.
>
> Original change's description:
> > Implement statements and expressions in DSL C++ code generator.
> >
> > This CL removes the bulk of the existing C++ code generator, especially
> > all the complex format-string assembly code. It has been replaced with
> > actual DSL code generation. Simple IR can now be successfully translated
> > to a working DSL fragment processor.
> >
> > This CL also adds a simple test harness which is patterned after the
> > existing SkSLTest; it renders a pixel, reads it back, and fails the test
> > if the result isn't solid green (RGBA=0101).
> >
> > This CL doesn't implement every feature. Some obvious gaps include:
> > - Sampling from children
> > - Uniforms/inputs of any kind
> > - Function calls of any kind
> >
> > Change-Id: Ib80c23fe1ba4453f7c3cb43b65f93c5ea0deb709
> > Bug: skia:11854
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396757
> > Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Commit-Queue: John Stiles <johnstiles@google.com>
>
> Bug: skia:11854, skia:11891
> Change-Id: I91363e31f34611d15ae350b52d6fc459feeace9c
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399076
> Auto-Submit: John Stiles <johnstiles@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>

Bug: skia:11854
Bug: skia:11891
Change-Id: Ib1f08256c84d1da2130e0b61356f72435dc0a5a8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399740
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-04-22 20:01:33 +00:00
Brian Salomon
071182ed1d always use shader based tile modes for blurs in reduced shader mode
Bug: skia:11844
Change-Id: I7a02a4848ed81f16b05df0729070660faf8fce86
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399744
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2021-04-22 19:09:33 +00:00
Kevin Lubick
4755b0b525 [canvaskit] Add TextHeightBehavior
Bug: skia:11881
Change-Id: I220f5ad43de95324172ee5b6d3d5a975a3f8a166
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399836
Reviewed-by: Julia Lavrova <jlavrova@google.com>
2021-04-22 18:21:44 +00:00
Mike Klein
dd8f8ed384 clean up defines that do nothing
These are leftovers.  Should be a noop.

Change-Id: I9897841e63b417a63d6f2d681a8ac4ae50ebb485
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399797
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2021-04-22 18:02:59 +00:00
Adlai Holler
d37a085cd0 Enable DAG reordering on almost all bots
We exclude the NUC5PPYH just to get desktop coverage,
and we exclude the Pixel4, 4XL, 5 because of an apparent driver
bug I'm in the progress of tracking down.

Bug: skia:10877
Change-Id: Ic925cc7434c5228bcc2ee07ae752f89229db55c7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399742
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2021-04-22 16:55:39 +00:00
Herb Derby
d5a676441a use GrArenas for direct glyph drawing
The existing code incorrectly uses the recordTimeAllocator.
Add a SubRunAllocator to the GrArenas, and use GrArenas to
store direct glyph drawing information.

Change-Id: I38ba25658364a48af5c775315331795d3d22121f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397476
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-04-22 16:43:31 +00:00
Chris Dalton
b90447c04d Turn off mixed samples
Mixed samples is no longer relevant for Ganesh. DMSAA and the new
Ganesh architecture both rely on full MSAA, and any platform where
mixed samples is supported will ultimately not use the old
architecture.

This CL is step one of two in dropping support for mixed samples. Once
the gold expectations are updated, we will come back through and
delete the code.

Change-Id: Ib8d21dc285555f8bbfb45c3f1fb509af215f5bad
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399496
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-04-22 16:23:19 +00:00
Brian Salomon
fdc82b4c64 Reland "Use SkImage_Base::asFragmentProcessor in SkGpuDevice."
This is a reland of 11524527bc

Original change's description:
> Use SkImage_Base::asFragmentProcessor in SkGpuDevice.
>
> A step towards getting rid of GrTextureProducer family of classes.
>
> Bug: skia:11877
> Change-Id: I42e0f24441d7b64fd0e6b27671100750b80d15f4
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398876
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

Bug: skia:11877
Change-Id: Ic551b085c85f989fafb524751bdf27f15b6585c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399743
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-04-22 15:44:39 +00:00
Robert Phillips
98b066cbe8 Add fuzzer for Triangulating Path Renderer
Bug: skia:11892
Change-Id: I3f8145516f8fd23eb05c29517cd5c1553c9b1df1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399296
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2021-04-22 15:35:29 +00:00
Joe Gregorio
a4e2f28697 Turn down SamsungChromebook2012 devices.
They are 9 years old.

Bug: skia:11876
Change-Id: I716880fd2405524b09543c9a166dc46e6b8ad815
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399500
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
2021-04-22 15:27:10 +00:00
Adlai Holler
729191d4c0 Add missing GrGLCaps logs
I tried to keep the log statements in line with the caps fields
themselves.

Also removed an unused cap.

Change-Id: I7b7f2ec0320fc72b57dc104be41ee7b5d12e6415
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399741
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>
2021-04-22 15:19:59 +00:00
Mike Klein
5beb2b30b7 virtual+final in base class??
As far as I can tell, this is nonsense.

Change-Id: I2cd4c0eea15e3c611fbd043f3790216301362938
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399796
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2021-04-22 14:57:59 +00:00
Brian Salomon
aae8ccc78f Revert "Use SkImage_Base::asFragmentProcessor in SkGpuDevice."
This reverts commit 11524527bc.

Reason for revert: assert on pre-abandon bot

Original change's description:
> Use SkImage_Base::asFragmentProcessor in SkGpuDevice.
>
> A step towards getting rid of GrTextureProducer family of classes.
>
> Bug: skia:11877
> Change-Id: I42e0f24441d7b64fd0e6b27671100750b80d15f4
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398876
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: Idb84c05857e52fdb00f876d53e4b891329ca76bb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11877
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399739
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-04-22 14:00:41 +00:00
John Stiles
126128b37c Revert "Reland "Implement statements and expressions in DSL C++ code generator.""
This reverts commit c412688798.

Reason for revert: fix Google3 roll and wasm build

Original change's description:
> Reland "Implement statements and expressions in DSL C++ code generator."
>
> This is a reland of 16cbfb41df
>
> Tests now rely on `shaderDerivativeSupport` and `integerSupport` as
> proxies to indicate ES3 support. The SwitchStatement test has been
> adjusted to hopefully confuse fewer compilers.
>
> Original change's description:
> > Implement statements and expressions in DSL C++ code generator.
> >
> > This CL removes the bulk of the existing C++ code generator, especially
> > all the complex format-string assembly code. It has been replaced with
> > actual DSL code generation. Simple IR can now be successfully translated
> > to a working DSL fragment processor.
> >
> > This CL also adds a simple test harness which is patterned after the
> > existing SkSLTest; it renders a pixel, reads it back, and fails the test
> > if the result isn't solid green (RGBA=0101).
> >
> > This CL doesn't implement every feature. Some obvious gaps include:
> > - Sampling from children
> > - Uniforms/inputs of any kind
> > - Function calls of any kind
> >
> > Change-Id: Ib80c23fe1ba4453f7c3cb43b65f93c5ea0deb709
> > Bug: skia:11854
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396757
> > Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Commit-Queue: John Stiles <johnstiles@google.com>
>
> Bug: skia:11854, skia:11891
> Change-Id: I91363e31f34611d15ae350b52d6fc459feeace9c
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399076
> Auto-Submit: John Stiles <johnstiles@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>

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

Change-Id: I71a8cf31e8a013b7a2a0d10f0ad3bc3893ea07ea
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11854
Bug: skia:11891
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399499
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-04-22 13:45:00 +00:00
John Stiles
289da86e37 Revert "Add support for uniforms and layout(key)s to DSLCPPCodeGenerator."
This reverts commit f33b061e3b.

Reason for revert: Google3 roll and wasm build

Original change's description:
> Add support for uniforms and layout(key)s to DSLCPPCodeGenerator.
>
> Change-Id: I77c386e3d72fb4a5986e5efb8bc9d409200534d1
> Bug: skia:11854
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398457
> Commit-Queue: John Stiles <johnstiles@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

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

Change-Id: I006ece639fa6051ff6ef1c496e648db9d5d0b30a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11854
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399498
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-04-22 13:43:20 +00:00
Ravi Mistry
27095f28d0 Revert "Display a Docs-Preview link for each modified MD file"
This reverts commit 42d753031d.

Reason for revert: Replaced by the work in skbug.com/11824

Original change's description:
> Display a Docs-Preview link for each modified MD file
>
> Bug: skia:11824
> Change-Id: I6bd557affca5ccf9f2936d86e2b0da168ceb2670
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/390577
> Commit-Queue: Ravi Mistry <rmistry@google.com>
> Reviewed-by: Joe Gregorio <jcgregorio@google.com>

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

Bug: skia:11824
Change-Id: Ia874ed6474fcae4698cd676dbdf208dbdefdedc4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399716
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2021-04-22 13:39:28 +00:00
Brian Salomon
11524527bc Use SkImage_Base::asFragmentProcessor in SkGpuDevice.
A step towards getting rid of GrTextureProducer family of classes.

Bug: skia:11877
Change-Id: I42e0f24441d7b64fd0e6b27671100750b80d15f4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398876
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-04-22 13:01:18 +00:00
Greg Daniel
805c62200d Move cached render passes onto GrVkFramebuffer.
This moves them off of GrVkRenderTarget so that they can be directly
accessed with just a GrVkFramebuffer.

Bug: skia:11809
Change-Id: I5e5024779dc106642de9035400df2b04d35ad753
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398657
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2021-04-22 13:00:18 +00:00
Brian Salomon
3036defd9e In reduced shader mode 1D Gaussian effect doesn't bake loop count.
Good for 92 shader compile reduction in desk_carsvg.skp.

This is probably a candidate for doing all the time, not just in reduced
shader mode.

Bug: skia:11844
Change-Id: I84e1b41580828d6a4a548c19480cf12c47eeb299
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399416
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-04-22 12:47:18 +00:00
skia-autoroll
f21d097523 Roll Chromium from 6e17434800cb to faf3e3230d75 (444 revisions)
6e17434800..faf3e3230d

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: If4740a88ac8a9632f4745a1edcfb17ede4fd2259
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399596
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-22 05:52:28 +00:00
skia-autoroll
32657c71f9 Roll ANGLE from d170f8e11bdb to e0e5eb8480ab (14 revisions)
d170f8e11b..e0e5eb8480

2021-04-22 jmadill@chromium.org Fix ScanReverse on posix/32-bit.
2021-04-22 ianelliott@google.com Vulkan: Allow logging with VVL and/or AGI debug utils to be used
2021-04-21 jmadill@chromium.org infra: Add Android builders to CQ by default.
2021-04-21 jmadill@chromium.org Add first() and last() to BitSetArray.
2021-04-21 jmadill@chromium.org Replace ijar sources with Chromium subtree mirror.
2021-04-21 jmadill@chromium.org Remove libGLESv1_CM static.
2021-04-21 jmadill@chromium.org Android: Enable APK build.
2021-04-21 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 141612cc6143 to 2e3165386670 (489 revisions)
2021-04-21 syoussefi@chromium.org Reland "Revert "Vulkan: Suppress draw-time push constant VVL warnings. ""
2021-04-21 jmadill@chromium.org Remove 'six' from roll_chromium_deps.
2021-04-21 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from 494bfcf95bd6 to e5bb9b56c292 (4 revisions)
2021-04-21 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from dac99e8221a8 to c597a8af03ef (2 revisions)
2021-04-21 lubosz.sarnecki@collabora.com tests: Add DepthStencilTestES3.ReadPixelsDepth24.
2021-04-21 lehoangq@gmail.com Metal: Distinguish Metal backend from OpenGL's Metal driver

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 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: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: jvanverth@google.com
Test: Test: angle_end2end_tests --gtest_filter=DepthStencilTestES3.ReadPixelsDepth24/ES3_Vulkan_SwiftShader
Change-Id: Ibec081af303c11f146dbb6dd48a44736908049ef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399597
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-22 04:51:57 +00:00
Chris Dalton
6ca9e18bf6 Update GrStrokeTessellator to make its own shader
Bug: skia:10419
Change-Id: I656e2508e95a47e03af431734ac06cbdb41232c6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398356
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-04-21 22:58:37 +00:00
Brian Osman
e5877456ef Restore cube demo to canvaskit demo page
Lighting isn't quite right, but this is far better than nothing.

Change-Id: I5ad663be01554da68d878a383855cd719a9952f2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399338
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-04-21 21:55:27 +00:00
Stephen White
7111881617 Dawn: moar updates for WebGPU API change.
Bug: skia:11855
Change-Id: Iaaf4a46e1fdb603cad214ea97531ab371ea03354
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399337
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Stephen White <senorblanco@google.com>
2021-04-21 21:49:27 +00:00
Herb Derby
93250090c2 Reland "remove fAllocators from GrOpsTask"
This is a reland of f00d6a8efd

This change is significantly different from the original.

The lifetime of GrArenas on the GrSurfaceFillContext is from
first GrOpsTask creation to the completion of the first call
to GrOpsTask::onExecute. The overall lifetime of the GrArenas
is from first GrOpsTask creation until the last dtor of the
GrOpsTask.

There are checks in the GrArena to make sure that nothing is
allocated after it is removed from the GrSurfaceFillContext.

Original change's description:
> remove fAllocators from GrOpsTask
>
> Change-Id: I5901f005c2758a92692e5cd70ba46a2b5ad797fd
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/393116
> Commit-Queue: Herb Derby <herb@google.com>
> Reviewed-by: Adlai Holler <adlai@google.com>
> Reviewed-by: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

Change-Id: I9ca2ae09ddd3b3eb95981013f54ab4168b5c5b49
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397141
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-04-21 21:28:47 +00:00
Brian Osman
716aeb9008 Allow a coords parameter to fragment shaders for testing
Change-Id: Ic5b64abce36129e95ccc23480bffef439626d20a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399080
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-04-21 20:27:27 +00:00
Brian Salomon
80a1f948d4 Don't unroll gaussian blur kernel loop on ES3+ capable devices
Doesn't reduce total number of shaders (yet).

Bug: skia:11844
Change-Id: Ie03749807e18760c9242732587516a59fed721a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398796
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2021-04-21 20:22:12 +00:00
John Stiles
f33b061e3b Add support for uniforms and layout(key)s to DSLCPPCodeGenerator.
Change-Id: I77c386e3d72fb4a5986e5efb8bc9d409200534d1
Bug: skia:11854
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398457
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-04-21 20:18:07 +00:00
John Stiles
c412688798 Reland "Implement statements and expressions in DSL C++ code generator."
This is a reland of 16cbfb41df

Tests now rely on `shaderDerivativeSupport` and `integerSupport` as
proxies to indicate ES3 support. The SwitchStatement test has been
adjusted to hopefully confuse fewer compilers.

Original change's description:
> Implement statements and expressions in DSL C++ code generator.
>
> This CL removes the bulk of the existing C++ code generator, especially
> all the complex format-string assembly code. It has been replaced with
> actual DSL code generation. Simple IR can now be successfully translated
> to a working DSL fragment processor.
>
> This CL also adds a simple test harness which is patterned after the
> existing SkSLTest; it renders a pixel, reads it back, and fails the test
> if the result isn't solid green (RGBA=0101).
>
> This CL doesn't implement every feature. Some obvious gaps include:
> - Sampling from children
> - Uniforms/inputs of any kind
> - Function calls of any kind
>
> Change-Id: Ib80c23fe1ba4453f7c3cb43b65f93c5ea0deb709
> Bug: skia:11854
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396757
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>

Bug: skia:11854, skia:11891
Change-Id: I91363e31f34611d15ae350b52d6fc459feeace9c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399076
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-04-21 20:17:07 +00:00
Herb Derby
f9cf1aa2ca add drawGlyphs for SkRSXform
Add a drawGlyphs to SkCanvas that takes SkRSXform instead of
positions. Update buffer sizing calculations to take
SkRSXform buffers into account.

Change-Id: I14529088199dcd0b1ae78b4605e1ba77fec2000e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399096
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2021-04-21 19:43:37 +00:00
Michael Ludwig
29c06bc82a Revert "Stop using copying SkPath::Iter for convexity and contains checks"
This reverts commit 3752760157.

Reason for revert: asan failures

Original change's description:
> Stop using copying SkPath::Iter for convexity and contains checks
>
> This also ensures that consecutive moveTos at the start and end of the
> path do not affect convexity, and updates AutoBoundsUpdate respects
> that as well.
>
> Bug: 1187385
> Change-Id: I9d9d7ab7f268003ff12e46873d7b98d993db47fe
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396056
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Mike Reed <reed@google.com>

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

Change-Id: I46aaca9c709be7124fc3933f5d02f20f5d2b42ea
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1187385
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399376
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2021-04-21 19:43:18 +00:00
Greg Daniel
a36cb40671 Remove more uses of GrRenderTarget from GrVkOpsRenderPass.
There are still a couple more uses of GrRenderTarget in the render pass
but they involve larger changes which will be pulled out into their
individual CLs.

Bug: skia:11809
Change-Id: I1f0cc2505250916e32dde03e505ed05c3179bc47
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398656
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-04-21 19:04:37 +00:00
John Stiles
422f630d5d Fix double line-numbering when reporting shader errors.
http://screen/58kQnRtVymHQcT2

Change-Id: I8a56337520acede6cafdc4de4d44913a032c9d24
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399216
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-04-21 18:49:57 +00:00
Michael Ludwig
3752760157 Stop using copying SkPath::Iter for convexity and contains checks
This also ensures that consecutive moveTos at the start and end of the
path do not affect convexity, and updates AutoBoundsUpdate respects
that as well.

Bug: 1187385
Change-Id: I9d9d7ab7f268003ff12e46873d7b98d993db47fe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396056
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2021-04-21 18:45:27 +00:00
skia-autoroll
e07788ee2c Roll skcms from 623cdd693261 to 31ba46d6a284 (1 revision)
https://skia.googlesource.com/skcms.git/+log/623cdd693261..31ba46d6a284

2021-04-21 mtklein@google.com use print_shortest_float() for matrix values

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/skcms-skia-autoroll
Please CC jvanverth@google.com,mtklein@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: luci.chromium.try:linux-blink-rel
Tbr: jvanverth@google.com,mtklein@google.com
Change-Id: Ia751e80822bae892cf60a7f6fa287d73d1f97ad5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399164
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-21 18:28:27 +00:00
Brian Osman
e37660b43c Use SkRuntimeEffect::MakeForShader in CanvasKit
The old factory is deprecated. The new factory does stricter checking on
the signature of main and calls to sample - verifying that the SkSL is
valid as an SkShader (vs SkColorFilter) at effect creation time.

Bug: skia:11813
Change-Id: I8d70f81b5c3fa78b05add1b591caf1d26dd70402
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399077
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-04-21 17:44:12 +00:00
Greg Daniel
374f96c9de Don't pass render target to GrGLSLProgramBuilder.
The base class does not use the GrRenderTarget and most subclasses do
not use it eitehr. So remove the GrRenderTarget from these classes and
have specific subclasses store the GrRenderTarget if they need it.

Bug: skia:11809
Change-Id: Idee5419377e1b5e328c8c88666c9344f642beb63
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399056
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-04-21 17:42:47 +00:00
skia-autoroll
9db8bb4b05 Roll skcms from a638db877ef8 to 623cdd693261 (1 revision)
https://skia.googlesource.com/skcms.git/+log/a638db877ef8..623cdd693261

2021-04-21 mtklein@google.com zero output_channels to skip B2A CLUT

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/skcms-skia-autoroll
Please CC mtklein@google.com,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: luci.chromium.try:linux-blink-rel
Tbr: mtklein@google.com,jvanverth@google.com
Change-Id: Ib3205076620ff133dfcb54bdbf21b60a32acf3e2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399137
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-21 17:39:07 +00:00
Brian Salomon
5d627f3eba Remove support for SK_DISABLE_BILINEAR_BLUR_OPTIMIZATION
Bug: skia:11796
Change-Id: Ibc29485c2d6375a705d4efa3e2836dff9c73e378
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398818
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-04-21 16:51:27 +00:00
Brian Osman
f6123f1dcc Convert some SkRuntimeEffect::Make to use stage-specific factories
The old factory is deprecated. The new ones do stricter checking on the
signature of main and calls to sample, and include checks at effect
creation-time that the SkSL is valid for the requested stage.

Bug: skia:11813
Change-Id: Ibd15a6f90e74bdc9c2352d3dc61b6682f626f413
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397477
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-04-21 16:19:57 +00:00
Brian Osman
af4e2331d1 Add tests of the runtime effect stage factories
We were testing this with .rtcf and .rts files, but those don't go
through the MakeForXXX factories. This would have caught the bug fixed
in https://skia-review.googlesource.com/c/skia/+/398229

Change-Id: Id824e7bf32982c043978b2981cfd91dd7a9b2585
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398183
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-04-21 16:05:37 +00:00
John Stiles
8676ebe350 Demonstrate DSL for statements with multiple vardecls.
These now work, thanks to a combination of
http://review.skia.org/398221 and
http://review.skia.org/398017.

Change-Id: Ied1d6a39803c19dfa762a45e0ca4800820bb1c0a
Bug: skia:11868
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397219
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-04-21 15:03:37 +00:00
John Stiles
bf9dff6f51 Switch deque to forward_list for memory use.
Landing this to test the difference in memory consumption vs deque. If
this doesn't help, we can try a different approach.

Change-Id: I7d0e8a2e694671db7e7627754bc305991fea5b5c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399016
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-04-21 14:37:57 +00:00
Brian Salomon
9a56eb7063 Consolidate on SkImage_Gpu constructor that takes SkColorInfo.
Also take SkImageInfo in SkImage_GpuBase.

Change-Id: Ie6d71a9a4a3740b9acc0faae72df2796e9a0e567
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398230
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-04-21 14:19:27 +00:00
Michael Ludwig
af5afed000 Add makeAnalysisCanvas to SkStrikeServer
Once chromium is updated to use this function instead of using the
SkTextBlobCacheDiffCanvas constructor directly, we can update the
analysis canvas to be the base SkCanvas with the custom text analysis
SkDevice. This will let the text analysis become aware of auto-layers
for image filters.

Bug: chromium:1187246, chromium:1194701
Change-Id: I289201b95c368446e57fea01ad0c3e1e3fd0d3c5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398658
Commit-Queue: Herb Derby <herb@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2021-04-21 13:19:57 +00:00
Florin Malita
7924446c45 [androidkit] Add Canvas.drawColor()
Three flavors:

  - Color
  - rgba float tuple
  - int (legacy SkColor)

Change-Id: I3038e27e433a5d92d4c6c3e3bb80374b63f87b34
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398181
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2021-04-21 13:08:32 +00:00
Florin Malita
3397f71098 [androidkit] Simple animation demo
Oscillating rect demo using a dedicated render thread.

At the moment this is using an intermediate Bitmap for rendering, but
should be converted to native GL Surface when it becomes available.

TBR=
Change-Id: I9b4f66598b6d2b56e865e7f1d10139a2bcf1f3e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398536
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2021-04-21 13:07:27 +00:00