Commit Graph

51532 Commits

Author SHA1 Message Date
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
Greg Daniel
ca107f3287 Fix variable name in new uma macro.
Bug: skia:10871
Change-Id: Idfdd2cca2642bad597eaff1bda8b240d6740d7f0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330156
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-10-28 14:24:31 +00:00
John Stiles
15bfe3837a Split the SkSL pool into small and large sections.
To make this possible, the logic for maintaining a pool of a given node
size has been split into a separate `Subpool` class. We now have two
Subpool objects in the PoolData class; they are always adjacent in
memory, and we can still identify a pooled node just as easily by
verifying that the pointer address is within the range of one of our
Subpools. (Identifying which subpool requires one extra check.)

This change will allow us to pool a handful of larger allocations, which
will benefit almost every program since a handful of variables and
functions are universally necessary, even in simple code.

For now, the chosen size of a large node is just a guess (2x the small
node size); this can be adjusted easily once we have a better idea of
the expected sizes for our larger IRNodes, but for now this successfully
catches a significant number of allocations in `sksl_medium` and
`sksl_large`.

Change-Id: I08fb9c55c02162d4b56e72ff4e0923f2cf258651
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330124
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-10-28 14:11:41 +00:00
Florin Malita
056385b1c6 [svg] Convert text-anchor to a presentation attribute
https://www.w3.org/TR/SVG11/text.html#TextAnchorProperty

Bug: skia:10840
Change-Id: Iff647b62243c42150e873f06215401b5e33705fd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330125
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Tyler Denniston <tdenniston@google.com>
2020-10-28 14:10:01 +00:00
Tyler Denniston
72af246561 Add support for arc-length metric in variable width stroke sample
I left in the ability to swap between using % arc length versus dividing
t evenly up across path segments so we can easily visually compare the
effect.

Change-Id: Id83792aa9e22fd5464e956092bac0baec389ffed
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330103
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2020-10-28 13:40:21 +00:00
John Stiles
270b5c04c2 Reland "Update the SkSL pool interface to take an allocation size."
This is a reland of 22ef2257c8

This reland fixes an issue with ExternalValue nodes on 32-bit builds;
these should never be pooled, because we can't control their lifetimes.

Original change's description:
> Update the SkSL pool interface to take an allocation size.
>
> Since our end goal no longer has all IRNodes ending up as the exact same
> size in memory, it makes sense for the allocator function to take in a
> desired size. This also opens the door to separate "small" and "large"
> pools, if we want to add pooling support for large but semi-common
> things like Variables.
>
> Change-Id: If3dbe31588adeedede327c5967c344a19507b6fa
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/329961
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>

Change-Id: If701ae4a5e18b66d4138bc09c9c8dc1a60579c90
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330105
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-28 13:26:01 +00:00
skia-autoroll
7b14f2f6e9 Roll ANGLE from 98c5ff6b49b3 to ee4e0866cb85 (17 revisions)
98c5ff6b49..ee4e0866cb

2020-10-28 timvp@google.com Vulkan: Add descriptor set allocation counters
2020-10-28 jmadill@chromium.org Trace Tests: Allow runs against SwiftShader.
2020-10-28 timvp@google.com Create test Texture2DTestES3::ChangeTexSizeWithTexStorage()
2020-10-28 jdarpinian@chromium.org ANGLE_platform_angle_device_context_volatile_* extensions
2020-10-27 ianelliott@google.com Enable debug-util markers with an env var/property
2020-10-27 syoussefi@chromium.org Vulkan: Remove VVL warning suppression for push constants
2020-10-27 jmadill@chromium.org Capture/Replay: Move exported data to start of header.
2020-10-27 jmadill@chromium.org Fix extension requirement for "World of Tanks".
2020-10-27 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from abe2eff36f3c to 34ae8a475754 (1 revision)
2020-10-27 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Loader from 91ce213a1d88 to 8e2b7d03ccfd (2 revisions)
2020-10-27 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from bb66fa41a163 to c1839ee3cedd (1 revision)
2020-10-27 angle-autoroll@skia-public.iam.gserviceaccount.com Roll glslang from 3b334b2b8e1a to 740ae9f60b00 (1 revision)
2020-10-27 xinghua.cao@intel.com Refactor uniform block test cases
2020-10-27 syoussefi@chromium.org Increase MAX_UNIFORM_BUFFER_BINDINGS to 72
2020-10-27 syoussefi@chromium.org Vulkan: Initial emulated prerotation support
2020-10-27 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 5f7e3cf264a2 to e56348f0e1a6 (434 revisions)
2020-10-27 syoussefi@chromium.org Use 4 colors in Checkered test shader

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: Manual verification with angle_perftestsTest: Test: Texture2DTestES3::ChangeTexSizeWithTexStorage
Change-Id: I500fd13db426c4ac05ed36fa17c88290886bf078
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330129
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-28 04:58:30 +00:00
skia-autoroll
6bda09d826 Roll Chromium from 6d5913cebce3 to 0b545254b82b (537 revisions)
6d5913cebc..0b545254b8

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: I1768d61588eca852d2f0cd14873c2e76868ad118
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330127
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-28 04:49:30 +00:00
skia-autoroll
784ac915d4 Roll Dawn from 41c24933da1e to 47ee61679da0 (8 revisions)
https://dawn.googlesource.com/dawn.git/+log/41c24933da1e..47ee61679da0

2020-10-27 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from bfd81096a5e6 to adb10d60de32 (1 revision)
2020-10-27 dneto@google.com Fix CMake build when building examples
2020-10-27 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 70a3f152f2f0 to bfd81096a5e6 (2 revisions)
2020-10-27 kainino@chromium.org Allow unaligned source offset in writeTexture
2020-10-27 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from fcbc6efa8fd3 to 70a3f152f2f0 (1 revision)
2020-10-27 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from 57694c8dab3c to fcbc6efa8fd3 (1 revision)
2020-10-27 cwallez@chromium.org s/OutputAttachment/RenderAttachment/g
2020-10-27 cwallez@chromium.org Make Surface reference its attached SwapChain

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: I30d5364070aac6758d461508179db7fc70b86d18
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330128
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-28 04:38:10 +00:00
Herb Derby
2acd43d7c9 switch unique_ptr with deleter to GrMemoryPool
I switched GrOps from using GrOpMemoryPool to
GrMemoryPool, but I forgot to switch over the
GrOp::Owner. Make sure the GrOp::Owner works for
both new/delete and GrMemoryPool.

In addition, convert one last unique_ptr<GrOp> to
GrOp::Owner.

Change-Id: I660ad77bee0f060f263ff2ed07974afb83063441
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330097
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-10-27 20:39:38 +00:00
Tyler Denniston
f548a028ce [svg] Implement gradientUnits="objectBoundingBox"
Currently only works properly when filling rects, since that is the only
node that implements bounds computation with this CL.

Summary of changes:

- Scale gradient coords by object bounds when units are
  kObjectBoundingBox.
- Make fGradientUnits protected instead of private.
- Change default value of fGradientUnits to kObjectBoundingBox, which
  is the default according to the spec.
- Change SkSVGNode::onObjectBoundingBox to take a full render context
  instead of length context.
- Implement bounds computation for SkSVGRect, SkSVGContainer and
  SkSVGUse.

Bug: skia:10842
Change-Id: I2e999985e67644e50da7f681fde190bcf4823eec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/329223
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2020-10-27 19:56:28 +00:00
Adlai Holler
532c74936b Add a bot to run with reduced ops task splitting
Change-Id: I2df0053ec7f26490d7b40b868b249d539d0c1530
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/329964
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2020-10-27 19:05:58 +00:00
Jerome Gaillard
e80251af3d Use shared version of libcutils for host Android builds
libcutils is now available as a shared library for host builds as well as Android builds.

Change-Id: Ief5625522933e9c261843436622b391e1eb7abe0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/329976
Reviewed-by: Leon Scroggins <scroggo@google.com>
Auto-Submit: Jerome Gaillard <jgaillard@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2020-10-27 18:07:00 +00:00
Florin Malita
9176c51b5c [skottie] Black & White effect
Add support for Adobe's Black&White effect [1].

Also plumb 'abs' for SkSL.

[1] https://helpx.adobe.com/after-effects/user-guide.html/after-effects/using/color-correction-effects.ug.html#main-pars_heading_2

Change-Id: Ia7dc24d6df9492867a1b1806ce7645586498161a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/329536
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-10-27 17:03:40 +00:00
John Stiles
3898bb5189 Revert "Update the SkSL pool interface to take an allocation size."
This reverts commit 22ef2257c8.

Reason for revert: mysterious tree breakage

Original change's description:
> Update the SkSL pool interface to take an allocation size.
>
> Since our end goal no longer has all IRNodes ending up as the exact same
> size in memory, it makes sense for the allocator function to take in a
> desired size. This also opens the door to separate "small" and "large"
> pools, if we want to add pooling support for large but semi-common
> things like Variables.
>
> Change-Id: If3dbe31588adeedede327c5967c344a19507b6fa
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/329961
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>

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

Change-Id: I346948aeb407dc6e6e84835f68d0353e4869ddf7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/329965
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-10-27 17:03:22 +00:00
Herb Derby
e32e1aba34 replace GrOpMemoryPool with GrMemoryPool
Change-Id: I93fdeaa3ea6be73619f82859bb53aa88fae3262b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/329962
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-10-27 16:15:11 +00:00
John Stiles
22ef2257c8 Update the SkSL pool interface to take an allocation size.
Since our end goal no longer has all IRNodes ending up as the exact same
size in memory, it makes sense for the allocator function to take in a
desired size. This also opens the door to separate "small" and "large"
pools, if we want to add pooling support for large but semi-common
things like Variables.

Change-Id: If3dbe31588adeedede327c5967c344a19507b6fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/329961
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-27 16:12:20 +00:00
Brian Osman
5567a6091c Guard traversal of certain kinds of mid-optimization IfStatement
When the test expression has a side-effect, but both the true and else
blocks are empty, the optimizer moves the test out to a standalone
ExpressionStatement. Updating the usage in that situation involves
traversing an IfStatement with no test.

Bug: oss-fuzz:26666
Change-Id: I2fb4004f2401784402040345df49a7d42e4aab5e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/329960
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-10-27 14:44:00 +00:00