Commit Graph

51549 Commits

Author SHA1 Message Date
Jorge Betancourt
f31e3d7320 add non-looping option to SkottieViews through xml attributes
stop running animation at the end if not looping


hook looping and background color into SkottieAnimation implementation


add looping attribute to SkottieView

Change-Id: I0c66026429018d61f49ccced1fd5add63619263a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/329816
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Tyler Freeman <fuego@google.com>
2020-10-30 19:24:30 +00:00
Chris Dalton
a3df50000f Fix crash in SampleCCPRGeometry
Fixes a crash introduced by 0e13db707f.

Change-Id: If250c57804705f35d11c1914efe5de2e6d5edb38
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330936
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-10-30 19:13:41 +00:00
John Stiles
869cdefdd1 Fix unknown-identifier issue discovered by fuzzer.
This error was caused by an unbalanced symbol table push. This could
occur when an interface block encountered an error while parsing its
var-decls.

Change-Id: I910a980ac92fac7c0786c48b8dc3003ee3e75e5b
Bug: oss-fuzz:26700
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330896
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2020-10-30 19:11:31 +00:00
Tyler Denniston
30e327e19e [svg] Rename gradient units type to object bounding box units
It turns out that "userSpaceOnUse | objectBoundingBox" can be specified
as the unit type for multiple elements, such as clips, masks, filters
etc. and is not specific to gradients.

The full list:
https://www.w3.org/TR/SVG11/coords.html#ObjectBoundingBoxUnits

Bug: skia:10842
Change-Id: I995d588862fb43b9f130f0455d7af8de47046af4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330616
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2020-10-30 18:56:40 +00:00
John Stiles
d5e6368fff Add initializer_list support to SkTArray.
Also added unit tests for each of SkTArray's various constructors, and
added `SkTArray::value_type` which allows calling code to refer to the
array's value-type. These unit tests exposed some preexisting strict-
aliasing issues in SkSTArray when compiled on GCC 6+ with optimizations
enabled, which are being investigated separately at skia:10891.

Change-Id: Ia0fb18830cfbbdcb1545fe7f7ac51d8e768a3f94
Bug: skia:10891
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330279
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-30 18:35:41 +00:00
John Stiles
750109bfd1 Update component arrays to use SkSTArray<4, int8_t>.
Profiling sksl_large showed a non-trivial amount of time was spent on
allocating vector<int>s related to swizzle components. This CL
essentially eliminates that cost, for a ~2% savings.

Nanobench before: http://screen/35m2rfy5B8h9eyg
Nanobench after:  http://screen/4GuW6ipodyBL34h

Change-Id: I653b69bf1bfbcfdf048987edd23e6f14a5ef3fbc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330336
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-30 18:24:02 +00:00
John Stiles
09479909d1 Add unit test for error discovered by fuzzer.
Before http://review.skia.org/330743 was submitted, this caused an
assertion during CFG generation: http://screen/95ZaTYzon4bMVtE

Change-Id: Icf93472394de3d17425ad1258a68b263cab88eb1
Bug: oss-fuzz:26759
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330816
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2020-10-30 18:18:31 +00:00
Greg Daniel
eed4cbab5e Guard use of GrVkGpu in GrAHardwareBufferUtils
Change-Id: I50467eb42528d2109bf7e0d682b3cc4ae892b53b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330817
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-10-30 16:34:39 +00:00
John Stiles
ec9db71e00 Fix prefix/postfix mixup discovered by fuzzer.
Change-Id: I8b70f456d1a659e46600bbad40b5bcadd08e8edf
Bug: oss-fuzz:26759
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330743
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-30 15:34:10 +00:00
Tyler Denniston
b3058ad5a5 Handle cubic segments in variable-width stroker
Change-Id: I51cc54e7f8b1b457a55f6cc91a9a6d3c5158d193
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330742
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2020-10-30 15:10:30 +00:00
John Stiles
2d4f959d7a Reland "Moved SkSL data back into node classes"
This is a reland of f71e0be970

Original change's description:
> Moved SkSL data back into node classes
>
> The original goal of this rearchitecture had been to move all of the
> data into IRNode so that we could manage IRNode objects directly rather
> than std::unique_ptr<IRNode>. Other changes have rendered that original
> goal obsolete, so this is undoing most of the work that was done during
> this rearchitecture.
>
> Change-Id: Ic56ffb17bb013c8b4884d710215f5345a481468a
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330297
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
> Reviewed-by: John Stiles <johnstiles@google.com>

Change-Id: Ifec4777a42ef0f95f6edc418dcd46fd38c856fa5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330739
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-30 14:59:10 +00:00
Greg Daniel
b7fc7a4677 Allow wrapping of protected AHB into vulkan SkSurfaces.
Bug: b/168500121
Change-Id: I9feda83181de53a45acd69a0001c3c1701d07b06
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330740
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-10-30 14:50:20 +00:00
John Stiles
9615bcf71f Revert "Moved SkSL data back into node classes"
This reverts commit f71e0be970.

Reason for revert: breaking Build-Debian10-EMCC-wasm-Release-WasmGMTests

Original change's description:
> Moved SkSL data back into node classes
>
> The original goal of this rearchitecture had been to move all of the
> data into IRNode so that we could manage IRNode objects directly rather
> than std::unique_ptr<IRNode>. Other changes have rendered that original
> goal obsolete, so this is undoing most of the work that was done during
> this rearchitecture.
>
> Change-Id: Ic56ffb17bb013c8b4884d710215f5345a481468a
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330297
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
> Reviewed-by: John Stiles <johnstiles@google.com>

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

Change-Id: I7a043c8e3e5c711164303cf160846d7cf20ddfbe
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330736
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-10-30 13:21:56 +00:00
skia-autoroll
c21902c0d3 Roll ANGLE from e3eaa60f1faf to 39b777c6f00f (20 revisions)
e3eaa60f1f..39b777c6f0

2020-10-30 jmadill@chromium.org Capture/Replay: Two cleanups.
2020-10-30 ynovikov@chromium.org Skip InstancingTest.NonIndexed* with non-zero Offset on Mac Mini 8.1
2020-10-30 ynovikov@chromium.org Skip EXTMultisampleCompatibilityTest.DrawAndResolve on Mac Mini 8.1
2020-10-30 ynovikov@chromium.org Suppress 2 DepthStencilFormatsTest.DepthStencilReadback on MacMini8.1
2020-10-30 ynovikov@chromium.org Skip ReadPixelsTextureTest.*LayerAttachment*PBO on Mac Mini 8.1
2020-10-30 ynovikov@chromium.org Skip WebGLCompatibilityTest.EnablePixelBufferObjectExtensions
2020-10-30 dpranke@google.com Make sure commit position is a string.
2020-10-29 timvp@google.com Vulkan: Make DescriptorPoolHelper a Resource
2020-10-29 ynovikov@chromium.org Skip Instanced MultiDrawTest.MultiDrawArrays on Mac Mini 8.1
2020-10-29 jmadill@chromium.org Gold Tests: Include SHA1 files in trace inputs.
2020-10-29 m.maiya@samsung.com Vulkan: Add OES_shader_image_atomic support
2020-10-29 timvp@google.com Disable libcxx_abi_unstable in roll_aosp.sh
2020-10-29 jmadill@chromium.org Add newline when using OutputDebugStringA logging.
2020-10-29 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from 87b0951f8dba to a72e7b987746 (3 revisions)
2020-10-29 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Loader from 8308d6744d50 to 428654245ad3 (1 revision)
2020-10-29 angle-autoroll@skia-public.iam.gserviceaccount.com Roll VK-GL-CTS from 483a71c5130e to e69b9b7294af (10 revisions)
2020-10-29 jonahr@google.com Remove include of nonexistant directory
2020-10-29 jmadill@chromium.org Skia Gold: Fix Android stdout parsing.
2020-10-29 geofflang@chromium.org Revert "ANGLE_platform_angle_device_context_volatile_* extensions"
2020-10-29 syoussefi@chromium.org Roll Vulkan-Loader from 8e2b7d03ccfd to 8308d6744d50 (2 revisions)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/angle-skia-autoroll
Please CC jcgregorio@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: jcgregorio@google.com
Test: Test: Build on AOSP and launch CuttlefishTest: Test: VulkanMultithreadingTest::MultiContextDrawSmallDescriptorPools()
Change-Id: I29826b7fee1120d45b564584bc96f230bd77484c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330681
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-30 05:05:09 +00:00
skia-autoroll
8755d3039c Roll Chromium from 6ce7ceff8d5e to 2357c7350401 (507 revisions)
6ce7ceff8d..2357c73504

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 jcgregorio@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: jcgregorio@google.com
Change-Id: Ia9dcc4498c8a347f9ce2a48d4bd20bc010848399
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330680
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-30 04:58:09 +00:00
skia-autoroll
f870a633b9 Roll SwiftShader from 2be25f08deaf to e6c9497255c6 (3 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/2be25f08deaf..e6c9497255c6

2020-10-29 capn@google.com Fix LLVM pointer element type
2020-10-29 capn@google.com Avoid false-positive MSan error for thread_local
2020-10-29 capn@google.com Update Marl to 3285a2dfb

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 jcgregorio@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: jcgregorio@google.com
Change-Id: Ib3fcc41511620af16e3ae49b6f510619b40a5dc0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330679
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-30 04:53:29 +00:00
skia-autoroll
8a6bdf14d2 Roll Dawn from a584311a6a73 to 25eb373eede4 (8 revisions)
https://dawn.googlesource.com/dawn.git/+log/a584311a6a73..25eb373eede4

2020-10-29 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from bfc2fceb840a to 5d40a5621b7d (1 revision)
2020-10-29 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from c8b2d23e9de7 to bfc2fceb840a (1 revision)
2020-10-29 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 6857ed0b0bc3 to c8b2d23e9de7 (1 revision)
2020-10-29 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from c55fc39acba8 to 6857ed0b0bc3 (1 revision)
2020-10-29 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 4dd5665502ad to c55fc39acba8 (1 revision)
2020-10-29 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 62bbc6f6c050 to 4dd5665502ad (1 revision)
2020-10-29 cwallez@chromium.org Fix RPDesc::occlusionQuerySet not defaulting to nullptr
2020-10-29 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from d2fa57d26dff to 62bbc6f6c050 (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 rharrison@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: rharrison@google.com
Change-Id: Id79541aca37ad2eb04561566a5143310f30ac9c9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330682
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-30 04:51:29 +00:00
John Stiles
4691b0f82b Fix crash when compiling FP files containing the modulo operator.
Change-Id: Idfbe128978575ab84b54485bffe2d82570ee099f
Bug: skia:10870
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330620
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-29 22:55:28 +00:00
Michael Ludwig
624482861e Improve GrTBlockList capabilities/correctness
Change-Id: I84de1cc582c6b3392881d376794703c61995b20f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330221
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-10-29 22:09:18 +00:00
John Stiles
8bc1a72cba Add unit test to demonstrate error with modulo in FP files.
(This CL also adds modulo to the IntFolding shared test, since this was
absent from the test. It's implemented and working properly already.)

Change-Id: I24a947ab38754bff2624cd5b58cf7a39553ca888
Bug: skia:10870
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330596
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-29 20:46:08 +00:00
Forrest Reiling
51e4024bac [flutter][fuchsia] Enable Effect Deserialization in Flutter on Fuchsia
Change-Id: I736a026af7a58461f806f1ea6504f317cdc9e74d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317016
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Forrest Reiling <freiling@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-10-29 20:18:06 +00:00
Ethan Nicholas
f71e0be970 Moved SkSL data back into node classes
The original goal of this rearchitecture had been to move all of the
data into IRNode so that we could manage IRNode objects directly rather
than std::unique_ptr<IRNode>. Other changes have rendered that original
goal obsolete, so this is undoing most of the work that was done during
this rearchitecture.

Change-Id: Ic56ffb17bb013c8b4884d710215f5345a481468a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330297
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-10-29 19:27:16 +00:00
Mike Klein
56957d9ccf remove unimplemented sk_data_new_empty()
Bug: skia:9585
Change-Id: I1fefd3598478d2f2c157d3a91750b5b92479b1b2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330278
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-10-29 16:20:06 +00:00
Mike Klein
fa2d468239 fix typo
This was declared correctly, but implemented with a typo.
That means, of course, it really can't be called.

Bug: skia:9584
Change-Id: Ibd652067d6b3bafcc7a5e67c367b48896b431204
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330277
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-10-29 16:19:43 +00:00
John Stiles
dd13dbaa99 Remove pool recycling mechanism.
This is an experiment to see if Windows performance numbers are impacted
by removing the recycler entirely. When pools were > 300K, the cost of
continually creating and destroying the pool in a tight loop was
prohibitive, but now that they are 64K, it's possible that the pool
allocation is less expensive and recycling them might not be worth the
downsides.

Change-Id: I7cf4f00e539310da2f852f36419f12d6904727cf
Bug: skia:10865
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330436
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2020-10-29 15:43:13 +00:00
Greg Daniel
771c750169 Track vulkan memory allocations in UMA.
We track the total amount of memory allocated and the percentage of the
allocated memory that is used.

Bug: skia:10871
Change-Id: I4aa120a3545d215cf42430aa6a73e924118f1dbc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/329963
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-10-29 15:24:23 +00:00
John Stiles
e5d729c1dc Free unused scratch space from idle Pools.
GrBlockAllocators will hang onto an extra scratch node unless you ask
them to reset. When a Pool is detached from its thread, we know that
we're done with whatever work we needed to do, so it's a good time to
reset any scratch space and reclaim that memory.

Change-Id: I0ff2c4fad9f51a2f3dc911730abad77c06af8d57
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330276
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-29 15:20:43 +00:00
John Stiles
23e68668d8 Reland "Replace pooling mechanism with GrMemoryPool."
This is a reland of 67e1cf4b1d

The iOS 8 code path now compiles normally

Original change's description:
> Replace pooling mechanism with GrMemoryPool.
>
> This change is a wash for tests that could fit inside the previous
> hard-coded pool (512 nodes) and appears to be a 5% improvement for
> sksl_large. Larger programs would hypothetically show an even more
> significant improvement.
>
> When SK_SUPPORT_GPU is disabled, we disable pooling entirely and fall
> back to the system allocator. This is necessary because SkSL can exist
> without Ganesh (such as in the wasm+CanvasKit build).
>
> Nanobench: http://screen/4xJEzdGducRxGeq
>
> Change-Id: I71dc702a84ab5c163673e35ec651003d7d45dacd
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330219
> Commit-Queue: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>

Change-Id: Iced330084f1ed8997e19bbee585422cb89e1c6b0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330404
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-29 15:19:13 +00:00
Robert Phillips
aed5bb86ac Remove unreliable SW mask caching assert
The key for the cached mask allows some slop in the subpixel
positioning of the mask. This means that, in rare circumstances,
the cached, integer draw-rect can differ from what would've been
computed directly.

Bug: 1143674
Change-Id: I1a0f47c0f8030c692bb737f8386da77348046af5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330410
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-10-29 15:12:13 +00:00
Greg Daniel
1a364c273e Fix gl copyTexSubImage format requirements.
Add checks for compatible channels and format types.

Bug:skia:10863
Change-Id: I44f9310097007c3ed70f94e949b10612a2fe2643
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/329421
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Alexis Hetu <sugoi@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-10-29 14:18:05 +00:00
Nigel Tao
09e541c415 Fix s/NULL/nullptr/ in src/codec/SkWuffsCodec.cpp
Change-Id: I968d61f7880e9d4c2748b758789aa10eff4996ab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330356
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2020-10-29 14:15:38 +00:00
John Stiles
b3cc5fdf53 Revert "Replace pooling mechanism with GrMemoryPool."
This reverts commit 67e1cf4b1d.

Reason for revert: iOS 8

Original change's description:
> Replace pooling mechanism with GrMemoryPool.
>
> This change is a wash for tests that could fit inside the previous
> hard-coded pool (512 nodes) and appears to be a 5% improvement for
> sksl_large. Larger programs would hypothetically show an even more
> significant improvement.
>
> When SK_SUPPORT_GPU is disabled, we disable pooling entirely and fall
> back to the system allocator. This is necessary because SkSL can exist
> without Ganesh (such as in the wasm+CanvasKit build).
>
> Nanobench: http://screen/4xJEzdGducRxGeq
>
> Change-Id: I71dc702a84ab5c163673e35ec651003d7d45dacd
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330219
> Commit-Queue: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>

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

Change-Id: I26dbd7f2d5348dd717c39fd0780ee5d140292e9a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330416
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-10-29 14:11:25 +00:00
Nigel Tao
f933e4fb56 Have SkWuffsCodec speak kRGB_565_SkColorType
This takes the "one pass" code path more often, using less memory, as it
does not have to allocate an intermediate width*height pixel buffer.

Wuffs v0.2 did not support RGB 565 color but Wuffs v0.3 does.

The Codec_AnimatedTransparentGif test passes with skia_use_wuffs true or
false.

Change-Id: Id569fc0bf62e614fa881cb235a9a6a1ca340dcb0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/329916
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2020-10-29 14:10:33 +00:00
Greg Daniel
5c53ae5a72 Remove old uma logging from Skia.
Bug: skia:10871
Change-Id: I193a72c9a59c85475352b13ff95ddbc3a97890b8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330220
Auto-Submit: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-10-29 12:44:03 +00:00
Robert Phillips
83c38a8fd6 Allow uniqueKey invalidation messages to reach the thread safe cache
With the addition of vertex data to the thread safe cache we also have
to handle the case where a given SkPath becomes inaccessible and
proactively invalidate the matching entry.

Bug: 1108408
Change-Id: Id11ce2aa10517f7c0772a253634d3c0d13e13460
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330261
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-10-29 12:36:13 +00:00
skia-autoroll
3cd384a5b0 Roll SwiftShader from c1839ee3cedd to 2be25f08deaf (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/c1839ee3cedd..2be25f08deaf

2020-10-28 capn@google.com Temporarily support both ORCv1 and ORCv2

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 jcgregorio@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: jcgregorio@google.com
Change-Id: I0fcdcdec94082d9c71c3f91953d6ae7cd9858778
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330306
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-29 05:03:46 +00:00
skia-autoroll
3fa8bae6e2 Roll ANGLE from ee4e0866cb85 to e3eaa60f1faf (16 revisions)
ee4e0866cb..e3eaa60f1f

2020-10-29 jmadill@chromium.org Revert "Tests: Update COD:Mobile trace"
2020-10-29 ianelliott@google.com Vulkan: Document how to turn on debug markers
2020-10-28 ianelliott@google.com Vulkan: App-compat for apps that disable validation & don't link
2020-10-28 cnorthrop@google.com Tests: Update COD:Mobile trace
2020-10-28 cnorthrop@google.com Tests: Add PUBG Mobile Lite trace
2020-10-28 geofflang@google.com Work around Mac glGenerateMipmap with missing levels bug.
2020-10-28 cnorthrop@google.com FrameCapture: Disable GL_OES_mapbuffer during capture
2020-10-28 cnorthrop@google.com FrameCapture: Track surface width/height per context
2020-10-28 jmadill@chromium.org Add the ability to re-trace existing traces.
2020-10-28 jmadill@chromium.org Fix unintialized data in VertexAttributeTest.
2020-10-28 cnorthrop@google.com FrameCapture: Handle glReadPixels with pack buffer
2020-10-28 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from 03f6ffd1dc46 to 87b0951f8dba (12 revisions)
2020-10-28 jmadill@chromium.org Capture/Replay: Always base replays on frame "1".
2020-10-28 jmadill@chromium.org Revert "Re-enable crash testing in angle_unittests."
2020-10-28 geofflang@google.com Expand DrawArraysWithAlignedAndUnalignedBufferOffset supression
2020-10-28 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from e56348f0e1a6 to 80c364fa8e53 (530 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 jcgregorio@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: jcgregorio@google.com
Test: Test: Capture PUBG MobileTest: Test: Capture PUBG Mobile LiteTest: Test: angle_perftests --gtest_filter="*cod_mobile*"Test: Test: angle_perftests --gtest_filter="*pubg_mobile_lite*"
Change-Id: I4d67719b5b7358e6b24f0cef1f48ee2ad1812128
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330305
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-29 04:57:36 +00:00
skia-autoroll
fc7a9be3d8 Roll Chromium from 0b545254b82b to 6ce7ceff8d5e (406 revisions)
0b545254b8..6ce7ceff8d

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 jcgregorio@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: jcgregorio@google.com
Change-Id: I8fafe5d3e7d40c7c7442adaabf7c2df461c1560b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330303
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-29 04:55:36 +00:00
skia-autoroll
4860462a27 Roll Dawn from 47ee61679da0 to a584311a6a73 (5 revisions)
https://dawn.googlesource.com/dawn.git/+log/47ee61679da0..a584311a6a73

2020-10-29 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 5ede1190cf97 to d2fa57d26dff (1 revision)
2020-10-28 kainino@chromium.org Integrate deprecation testing into DawnTestBase
2020-10-28 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from e8dc46a8c88b to 5ede1190cf97 (1 revision)
2020-10-28 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from c23a5652bda1 to e8dc46a8c88b (2 revisions)
2020-10-28 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from adb10d60de32 to c23a5652bda1 (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 rharrison@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: rharrison@google.com
Change-Id: I340143a243786e61ab08bc1bbccb7195f1ac97e7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330304
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-29 04:41:36 +00:00
John Stiles
67e1cf4b1d Replace pooling mechanism with GrMemoryPool.
This change is a wash for tests that could fit inside the previous
hard-coded pool (512 nodes) and appears to be a 5% improvement for
sksl_large. Larger programs would hypothetically show an even more
significant improvement.

When SK_SUPPORT_GPU is disabled, we disable pooling entirely and fall
back to the system allocator. This is necessary because SkSL can exist
without Ganesh (such as in the wasm+CanvasKit build).

Nanobench: http://screen/4xJEzdGducRxGeq

Change-Id: I71dc702a84ab5c163673e35ec651003d7d45dacd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330219
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-28 22:00:44 +00:00
Herb Derby
018f5f6dcc add comments about the use of different subrun types
Change-Id: I117485a784d7ceec5b89d73d08647a89a1a6be7d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330225
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-10-28 21:07:13 +00:00
John Stiles
1cc63da933 Mark IRNode leaf classes as final.
This provides the optimizer with hints so that it can avoid virtual
calls in scenarios where the type is known.

(The ExternalValue leaf class is excluded from this change; unlike
most IRNodes, it is meant to be subclassed.)

Change-Id: I68ff3e2336cb478bcc546c9fe3640719a01d8ea7
Bug: skia:10886
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330223
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2020-10-28 20:07:23 +00:00
Brian Osman
1f8f57502a SPIRV: Stop mutating (shared) interface blocks for no reason
This is trying to dynamically set the array bounds for sk_in, based on
the primitive type. However, the sizes() field of the interface block
isn't even used for that - it's done with similar logic in
writeInterfaceBlock. Also, this was using the wrong size for several
primitive types.

Bug: skia:7733
Change-Id: Ic0925b51d86dcaea718373bb16d633cc2cd3398f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330222
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2020-10-28 19:53:43 +00:00
Herb Derby
e25c30034a use SkArenaAlloc for combineIfPossible
Now that GrOps no longer needs a GrMemoryPool to be
deleted, just pass down the the SkArenaAlloc instead
of both the GrMemoryPool and SkArenaAlloc.

The alloc is only used for two ops, but we pass it
to all the ops most of which don't use it.

Change-Id: I873efcdfe44b446f2ac5089ea8425dff257e318c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330118
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-10-28 19:10:01 +00:00
Ben Wagner
541601602e Roll freetype 0a3d2bb99b45b72e1d45..40c5681ab92e7db1
0a3d2bb99b..40c5681ab9

More or less 2.10.1 to 2.10.4.

Change-Id: Ide743e911438dc321ce2b02ed7e18f619c7b86f7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330107
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-10-28 16:56:01 +00:00
Tyler Denniston
6a7a2c7355 Improve var-width miter joins
With variable width stroke, there is a curious case where both sides
need an inner or an outer join, instead of the fixed width case where
each side will have opposite join types. This improves the miter join
logic to treat the "left" and "right" sides separately.

There is still work to be done for joins, it's still too easy to create
weirdness.

Also improved debugging messages for degenerate cases instead of
silently swallowing the errors.

Change-Id: I4b6819e200138b39409b874a492b920d78f6a588
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330155
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2020-10-28 16:31:21 +00:00
Greg Daniel
d17860614f Revert "In Vk don't set dynamic blend constant on Pipeline if we don't use it."
This reverts commit 292f7777da.

Reason for revert: Oddly this is causing issues in vulkan chrome linux with specific window managers, see crbug.com/1141831

Original change's description:
> In Vk don't set dynamic blend constant on Pipeline if we don't use it.
>
> We already don't call the dynamic update for the blend constant if it's
> not used. This change makes it so we don't even tell the VkPipeline
> to have support for a dynamic blend constant. This allows the driver
> to make the pipline objects slightly more optimal.
>
> Change-Id: Ib7ea4e0ec7eeb8e7c1cf165d426ee863fa0a3a00
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/329036
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

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

Change-Id: Id8b74889b87c6402982fd4c8dcda3a5876005890
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330218
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-10-28 16:27:13 +00:00
John Stiles
244ebf7d5e Add reportLeaks method to GrMemoryPool.
This doesn't change any behavior; it just exposes existing code that
previously could only run at ~GrMemoryPool time. Now you can report
leaks on a memory pool without actually destroying it.

Change-Id: I35bf6c7d886827031cce0e2b045775207062c121
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330217
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-28 15:59:51 +00:00
Michael Ludwig
4ce77863d5 Fix clip shader coverage combining with geometry processor coverage
We were getting lucky with intersect in that the tested shaders always
ended up multiplying by the input alpha at the end. This adds a
dedicated GM that tests the difference op for clip shaders, across
a variety of shape types.

Bug: skia:10879
Change-Id: I45fdaad27f05ae7a74dbdc79eece2e9688806568
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330123
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-10-28 15:55:01 +00:00
Mike Klein
71f1266664 Revert "SkPathView for ownerless (can live on stack) SkPaths"
This reverts commit 375721d7bb.
Some manual edits needed due to time elapsed.

Bug: chromium:1141332, skia:10566
Change-Id: Iadb15d3f5334d9eed4e7053e9c19d75a0bbeb9de
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330196
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-10-28 15:25:41 +00:00