Commit Graph

54683 Commits

Author SHA1 Message Date
John Stiles
8e2a84be3d Fix for fuzzer-discovered error in SPIR-V compilation.
Unused InterfaceBlocks were not added to the ProgramUsage map. The
ProgramUsageVisitor now makes sure to account for them during its
initial scan.

Change-Id: If3afac8e954c5b685ddc6b63b0f771d8c0b8f207
Bug: oss-fuzz:33405
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398016
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-04-19 15:55:04 +00:00
Ethan Nicholas
db2326b46a Comma operator on DSL statements now creates unscoped blocks
Change-Id: I9eb85f25431b2d59b26e8cf8f4a73b9e45faa916
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/398017
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2021-04-19 15:37:24 +00:00
Brian Osman
cc3d2d25c5 Runtime effects: Detect passthrough sample calls automatically
As explained, this is *very* conservative. It only works when the child
is sampled from within main, and using a direct reference to the coords
parameter. If that parameter is ever modified (even after being used),
the optimization doesn't happen. For most cases, this is fine.

Bug: skia:11869
Change-Id: Ia06181730a6d07e2a4fe2de4cc8e8c3402f0dc52
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397320
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-04-19 14:52:44 +00:00
Brian Salomon
d0f35c241c Reflatten YUVA image on each request.
It should now be rare to require a RGBA texture from a YUVA image (e.g.
in image filter)

Removes a thread-safety issue. A step towards allowing clients to pump
new data into the planes and be sure Skia wont draw the old contents.

Bug: skia:11873

Change-Id: I007cf28e477155f85ed9f1c6cc4547f9dbbb73fd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397319
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-04-19 14:52:04 +00:00
Brian Salomon
816db16d19 GrMatrixEffect applies coord normalization/flip for GrTextureEffect.
It checks if its child is a GrTextureEffect and if so the child supplies
a matrix to concat.

Additionally, GrTextureEffect shader modes that operate on unnormalized
texture coords no longer receive prenormalized coords that must be
unnormalized.

Hoping this addresses (maybe partially) this regression:
https://perf.skia.org/e/?begin=1618332600&end=1618386249&keys=Xdf47e259cd874b84b2e0c31c9465abe8&num_commits=50&request_type=1&xbaroffset=54589

Bug: skia:11844
Change-Id: I97eeb88440d5d81acb3edd8c406b17680da67438
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397218
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-04-19 14:26:14 +00:00
skia-autoroll
59f1a9cb7a Roll Chromium from c6b364c274f4 to 3e8dec5e7dff (495 revisions)
c6b364c274..3e8dec5e7d

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: Ie6054c5c6ed4f48391197886d28236836325396d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397936
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-19 05:35:06 +00:00
skia-autoroll
5aebc93d38 Roll ANGLE from f2aa9d5da699 to b027dfeb83d0 (13 revisions)
f2aa9d5da6..b027dfeb83

2021-04-19 syoussefi@chromium.org Revert "Vulkan: Suppress draw-time push constant VVL warnings.
2021-04-17 syoussefi@chromium.org Suppress fifa mobile on intel/windows
2021-04-17 cnorthrop@google.com Tests: Add 3DMark Slingshot Test 2 trace
2021-04-17 cnorthrop@google.com Tests: Add 3DMark Slingshot Test 1 trace
2021-04-17 syoussefi@chromium.org Vulkan: Remove inappropriate use of VK_NULL_HANDLE
2021-04-17 cclao@google.com Vulkan: Add support for FBO with unequal sized attachments
2021-04-16 cclao@google.com Vulkan: Add test for FBO with unequal sized attachments
2021-04-16 syoussefi@chromium.org Skip failing test on AMD/Linux
2021-04-16 xiaoxuan.liu@arm.com Reland "Reland "Add support for Linux GPU info with Vulkan backend""
2021-04-16 cnorthrop@google.com Migrate more scripts to python3
2021-04-16 geofflang@google.com Remove 3pp files in third_party/jdk.
2021-04-16 m.maiya@samsung.com Vulkan: Handle non array type varying error case in TS
2021-04-16 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from cac0b331e3fc to 11d568cbfed1 (483 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 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: FramebufferTest_ES3.AttachmentWithUnequalDimensionsTest: Test: KHR-GLES32.core.tessellation_shader.compilation_and_linking_errors.te_non_arrayed_per_vertex_input_blocksTest: Test: angle_perftests --gtest_filter="*slingshot_test1*"Test: Test: angle_perftests --gtest_filter="*slingshot_test2*"Test: Test: python3 scripts/run_code_generation.py
Change-Id: Ie29de29aa0708d54d19b905df38177e97d0797e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397841
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-19 04:56:36 +00:00
skia-autoroll
3be203df83 Roll SwiftShader from f32791f5d53b to dac99e8221a8 (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/f32791f5d53b..dac99e8221a8

2021-04-16 capn@google.com Update Kokoro's clang-format to version 11.0.1

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/swiftshader-skia-autoroll
Please CC jvanverth@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md

Cq-Include-Trybots: skia/skia.primary:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: jvanverth@google.com
Change-Id: Ib7a189bb5a0eb006bce811a0985060ca3cea92ca
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397937
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-19 04:55:56 +00:00
skia-autoroll
5e99e36be0 Roll Dawn from 413dcf8a40df to b6c0dac11024 (6 revisions)
https://dawn.googlesource.com/dawn.git/+log/413dcf8a40df..b6c0dac11024

2021-04-17 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from fe70c75bc573 to 4649377d0575 (10 revisions)
2021-04-17 bajones@chromium.org Deprecate renderpass color/depth .attachment
2021-04-16 jrprice@google.com Enable WGSLUnsortedStructIO test
2021-04-16 jrprice@google.com Revert "Temporarily stop running tests on D3D12 with use_tint_generator"
2021-04-16 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from cc46e393e481 to fe70c75bc573 (19 revisions)
2021-04-16 enga@chromium.org Add default to VertexState.bufferCount

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from cc46e393e481 to 4649377d0575

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 alanbaker@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: alanbaker@google.com
Change-Id: Ica6872ca088498ff7f7f6a4307720a696d228d79
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397842
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-19 04:46:06 +00:00
skia-recreate-skps
8548784ed3 Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=rmistry@google.com
NO_MERGE_BUILDS

Change-Id: I10c87489c3e0812c80b61a4128858e56537b36cb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397896
Reviewed-by: skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2021-04-18 08:41:37 +00:00
skia-autoroll
be82005209 Roll SK Tool from dfcdab06d626 to 70f14bb1a417
https://skia.googlesource.com/buildbot.git/+log/dfcdab06d626..70f14bb1a417

2021-04-18 skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com Update CIPD Packages

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/sk-tool-skia
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

Tbr: jcgregorio@google.com
Change-Id: I0e97e303c47cc1854c77face5a40a781d244195a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397838
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-18 07:32:56 +00:00
Brian Osman
9d4741370c Revert "Fix sk_app macOS raster window build conditions."
This reverts commit 163ba10dde.

Reason for revert: Mac linker errors

Original change's description:
> Fix sk_app macOS raster window build conditions.
>
> The "raster" window on macOS is actually backed by GL. Fix the build
> rules and code conditions to reflect this. This allows for some sk_app
> applications to run on macOS with skia_use_gl=false.
>
> Change-Id: I5d7b37c4172079e163690faa4e55a622a6d4f844
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397256
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

TBR=bungeman@google.com,brianosman@google.com

Change-Id: Ie5fa24138e4387784c21559f28528a4c4d335626
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397737
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-04-17 17:41:27 +00:00
Ben Wagner
163ba10dde Fix sk_app macOS raster window build conditions.
The "raster" window on macOS is actually backed by GL. Fix the build
rules and code conditions to reflect this. This allows for some sk_app
applications to run on macOS with skia_use_gl=false.

Change-Id: I5d7b37c4172079e163690faa4e55a622a6d4f844
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397256
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-04-17 15:18:05 +00:00
Mike Reed
66aed2136b Expose proposed Shaper API to JS
Requires: https://skia-review.googlesource.com/c/skia/+/392837

Change-Id: I3b779b699fbcade7702049a83b98db8dfe86433d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397436
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-04-17 15:16:23 +00:00
skia-autoroll
d0ca961bd2 Roll SK Tool from 322ca33c3401 to dfcdab06d626
https://skia.googlesource.com/buildbot.git/+log/322ca33c3401..dfcdab06d626

2021-04-16 lovisolo@google.com [gold] Port various utility functions to TypeScript.
2021-04-16 borenet@google.com [autoroll] Remove waterfall -> emscripten-releases, add v8
2021-04-16 borenet@google.com Update CIPD Packages

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/sk-tool-skia
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

Tbr: jcgregorio@google.com
Change-Id: I13b0c9c554398f2a7de6593552318908888ae5c1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397676
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-17 08:57:54 +00:00
John Stiles
68072a4676 Perform the loop-exit test when continuing from inside a do-while.
SPIR-V would previously jump to the top of the do-while loop when
encountering a `continue`. This is not correct; it should jump to the
loop-exit test. We don't have any real shaders which test this case, and
it can't be checked from inside Runtime Effects since do-while is not
part of ES2.

Change-Id: Iac58e9e7ad0a94640e6418afea096b19ba50a2df
Bug: skia:11874
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397576
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-04-16 22:36:14 +00:00
Kevin Lubick
6e927095e1 [canvaskit] Remove isNode and saveAsPicture
This should fix https://github.com/flutter/flutter/issues/80221

Change-Id: I25e0ad58bcaad95b43cc94476af0e241e17ac244
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397289
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2021-04-16 20:55:54 +00:00
Ethan Nicholas
a0f7654fbe SkSL For statement now enforces correct initializer type
Bug: skia:11870
Change-Id: I960800ac554e3c189d0b708fa6cabccf071fd020
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397460
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-04-16 20:48:03 +00:00
Ethan Nicholas
624a529fbd Added an API for creating RuntimeEffects using the SkSL DSL.
Change-Id: I305016d305455e2b90fe904d8da93cf7735cc38e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/389316
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-04-16 19:36:54 +00:00
Chris Dalton
224e5e4d7e Generalize the squircle runtime effect to draw "super rounded rects"
These are rounded rectangles whose corners are superellipses instead
of ovals. This builds on a lot of work done by zakcohen@google.com to
define a consistent, visually appealing shape that can be used
reliably in the Android UI.

Change-Id: I97fde7be870152c9ee776fde53118019d0caa251
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397416
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-04-16 19:24:43 +00:00
Jim Van Verth
b5ea786dbd Viewer: apply same transform as slide to dimensions display.
Change-Id: Ic5192b072c98617dee85f28f8f4214c7a805a1fd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397318
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2021-04-16 19:24:23 +00:00
Adlai Holler
c81ad2d893 Lower GPU budget to 16MB on some desktop bots
This bot also runs reduceOpsTaskSplitting, so this allows us
to test the over-memory-budget fallback behavior.

At 16MB my desktop falls back on the following SKPs: desk_carsvg,
desk_twitter, desk_yahoosports, desk_linkedin, desk_facebook.

Bug: skia:10877
Change-Id: I60934e990581f762b72c077c6e8a40cc0c1d3d8c
Cq-Include-Trybots: luci.skia.skia.primary:Test-Debian10-Clang-NUC7i5BNK-GPU-IntelIris640-x86_64-Debug-All-ASAN_Vulkan,Test-Debian10-Clang-NUC7i5BNK-GPU-IntelIris640-x86_64-Debug-All-DDL3_ASAN
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397461
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-04-16 19:04:23 +00:00
weiyuhuang
32f15531c4 Add halfLeading to TextStyle and StrutStyle: https://github.com/flutter/engine/pull/24668
Change-Id: I5627cb163400880992db622bb887093da92d1cd5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394969
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
2021-04-16 18:58:25 +00:00
Greg Daniel
1456aff211 Fix android framework build in GrVkOpsRenderPass.
Bug: skia:11809
Change-Id: I1c35df8d78c676f5809a96d09c0493747afd11f2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397479
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-04-16 18:58:08 +00:00
John Stiles
6ac5310dfa Incorporate top-level DSL blocks into fragment processors.
A Block() at the top-level scope would previously disappear silently.

Change-Id: Ic3bac058361658d2e5bd8de1e3718dedf4cef1f7
Bug: skia:11854
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397516
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-04-16 18:22:33 +00:00
Mike Reed
da34d099fc Fix gm dimensions
Change-Id: I5fdbd290e1b5e58d382fbd3c438d2abaacb07400
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397317
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-04-16 17:09:59 +00:00
Greg Daniel
60ec617eaa Use GrVkFramebuffer throughout GrVkOpsRenderPass instead of GrVkRT.
This also connects a lot of the wires needed to use dynamic MSAA in
vulkan. By using the framebuffer object in the render pass we can figure
out the specific framebuffer we want in one place, GrVkGpu::onGetOpsRenderPass,
and then the render pass itself doesn't need any explicit knowledge of
dmsaa stuff.

Bug: skia:11809
Change-Id: I3e4e71fa6f9536fdaf915d5369a2f8a24bf48c9b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397156
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2021-04-16 17:03:43 +00:00
Adlai Holler
b34270e9bf Fix gpuResourceCacheLimit implementation
We need to wait until there's a resourceCache to set the value on.

Bug: skia:10877
Change-Id: I1558af6c369e857fbafb450179d3b341250ad16a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397459
Auto-Submit: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2021-04-16 16:57:02 +00:00
Mike Reed
b4e08be30c Expose experimental iterator on SkParagraph
Change-Id: Idcbb1e64780c87f4db9673ac184c02141aa6dee2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/392837
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
2021-04-16 16:50:33 +00:00
Kevin Lubick
e2b457ad5f Fix CMakeLists to find Emscripten headers
Change-Id: I02fa871eecd4dc3e24c47d4ad0d9bd16c1d59fda
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397462
Auto-Submit: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2021-04-16 16:45:22 +00:00
Herb Derby
e90a295f6c fix SkCanvas::drawGlyphs's bounds calculation
Change-Id: I9aea1f516ccb362cf28684de571bdd6971dd6f6c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397478
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2021-04-16 16:34:33 +00:00
Mike Reed
35c894e861 More plumbing for new virtual onDrawGlyphRunList
Also, disable quick-reject for now until bounds are fixed.

Change-Id: I08b9fa037d279a99fc393364a71cb171e3d16d4a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397458
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-04-16 15:26:13 +00:00
Brian Osman
ce585026db Fix implicit references to _input when GrSkSLFP invokes children
This actually solves two different bugs:

1) A call to sample(child) in a helper function would fail to compile.
   We were invoking the child's entry point with the default color
   argument of args.fInputColor. That was "_input", which is a parameter
   to our main.
2) The runtime effect's FP hard-wired references to the main color
   parameter to args.fInputColor (via a builtin id). This meant that the
   user code could change the variable, then call sample and have those
   changes visible to the child. That shoudln't happen (unless you
   actually pass a color to the child explicitly).

Doing this with an extra global variable is somewhat ugly, and adds some
overhead. Hopefully the driver is able to see through it and optimize
this.

Bug: skia:10506
Change-Id: I11d152bd9f8b270afd53d3bfa71d2e728c8fd729
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397154
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-04-16 15:05:22 +00:00
Brian Osman
829de5b409 Remove sample variants from runtime shaders
This limits users to sample(shader, coords). That's the actual semantics
of an SkShader, so we model it precisely. The other two versions of
sample were really (internal) optimization tricks, and we don't want to
externalize that.

Sample with matrix isn't particularly useful for clients (the child
can be constructed using a local matrix, if that's what you want).
Filed 11869 to detect when we're sampling using the un-modified incoming
coords, so we get the benefits of pass-through sampling automatically.

Bug: skia:11869
Change-Id: Id46d6d495d1d7f17341b5ffb453f62a0c74bd098
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397457
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-04-16 14:41:22 +00:00
skia-autoroll
f112483bfc Roll SK Tool from a34c89040445 to 28a50e3888cb
https://skia.googlesource.com/buildbot.git/+log/a34c89040445..28a50e3888cb

2021-04-15 jcgregorio@google.com [machine] Add filtering.
2021-04-15 jcgregorio@google.com Run 'go mod tidy' to remove unused modules.
2021-04-15 lovisolo@google.com Infra-PerCommit-Test-Bazel-Local: Fix bug.
2021-04-15 lovisolo@google.com [bazel] Update rules_nodejs to 3.4.0 and rules_sass to 1.32.8.
2021-04-15 lovisolo@google.com [perf] Fix CockroachDB test flakes.
2021-04-15 borenet@google.com [sk] Fix missing BUILD.bazel
2021-04-15 jcgregorio@google.com [perf] Move login init to be after config loading.
2021-04-15 borenet@google.com [sk] Add "asset" subcommand

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/sk-tool-skia
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

Tbr: jcgregorio@google.com
Change-Id: I917e4ca253fb741e97467898915ee4402deeb888
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397397
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-16 10:22:32 +00:00
skia-autoroll
c42f772718 Roll Chromium from b11e0710253c to c6b364c274f4 (482 revisions)
b11e071025..c6b364c274

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 brianosman@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: brianosman@google.com
Change-Id: Ifa0925b08136fcd24ba524e9d0eb3790a6b26aaa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397356
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-16 05:07:52 +00:00
skia-autoroll
e33da90dc4 Roll ANGLE from 212849e9323a to f2aa9d5da699 (16 revisions)
212849e932..f2aa9d5da6

2021-04-16 lehoangq@gmail.com Reland: Metal: Support importing external metal textures
2021-04-16 jmadill@chromium.org Android: Include android-deps into Android checkout.
2021-04-15 jmadill@chromium.org Vulkan: Implement shader buffers descriptor cache.
2021-04-15 jplate@google.com Generate CL enums in libGLESv2
2021-04-15 timvp@google.com Capture/Replay: Add PPO/glProgramUniform support
2021-04-15 syoussefi@chromium.org Remove suppression for fixed CTS tests
2021-04-15 cclao@google.com Vulkan: Consolidate mReadOnlyDepthStencilMode to mRenderPassUsageFlags
2021-04-15 cclao@google.com Vulkan: Support sample/render to depth texture with different LOD
2021-04-15 cclao@google.com Vulkan: Add test for render+sample depth texture with non-overlap LOD
2021-04-15 syoussefi@chromium.org Roll VK-GL-CTS from c4e6dbe68e04 to ededa67cb12a (76 revisions)
2021-04-15 syoussefi@chromium.org Skip TracePerfTest.Run/*_idle_heroes on Pixel 2
2021-04-15 jplate@google.com Clear macros 'NEAR' and 'FAR'
2021-04-15 lubosz.sarnecki@collabora.com Tests: Add Idle Heroes trace.
2021-04-15 gert.wollny@collabora.com Capture/Replay: Enable InstancingTest.LineLoop/* tests
2021-04-15 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 21426fd08f99 to cac0b331e3fc (436 revisions)
2021-04-15 gert.wollny@collabora.com JsonSerializer: Add tests for sorting and non-unique keys

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 brianosman@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: brianosman@google.com
Test: Test: FramebufferTest_ES3.RenderSampleImmutableDepthTextureWithExcludedLevelTest: Test: FramebufferTest_ES3.SampleFromAttachedTextureWithDifferentLODAndFBOSwitchTest: Test: angle_perftests --gtest_filter="*idle_heroes*"
Change-Id: I31c9b1594a3c7bca0c6f2b541aba5fddfedfe371
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396974
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-16 04:58:32 +00:00
skia-autoroll
1efd7fc993 Roll Dawn from e87ea2bedc8b to 413dcf8a40df (5 revisions)
https://dawn.googlesource.com/dawn.git/+log/e87ea2bedc8b..413dcf8a40df

2021-04-15 bajones@chromium.org Rename setBlendColor->setBlendConstant
2021-04-15 bajones@chromium.org Updated BlendFactor enum to match spec
2021-04-15 cwallez@chromium.org Temporarily stop running tests on D3D12 with use_tint_generator
2021-04-15 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from f8313e5a6e13 to cc46e393e481 (8 revisions)
2021-04-15 rharrison@chromium.org Fix unittests that are broken by --enable-toggles=use_tint_generator

Also rolling transitive DEPS:
  https://dawn.googlesource.com/tint from f8313e5a6e13 to cc46e393e481

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 alanbaker@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: alanbaker@google.com
Change-Id: I4231d24da0b4dd19400869d739f3468ae48c3ffe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397357
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-16 04:53:32 +00:00
Florin Malita
de89bf0cd7 [androidkit] Start sketching out Paint
Add Color and Paint classes:

  - Color is pure Java (equivalent of SkColor4f)
  - Paint is backed by a native SkPaint

Change-Id: I79dbfae48f9e51254a51bc1c3966930f32cea5c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396020
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2021-04-16 01:56:04 +00:00
Brian Osman
0962268099 Fix SampleUsage analysis for calls that use coords and color
Bug: skia:11867
Change-Id: I21e71c77518f0a942651f31061f43f80505090ea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397150
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2021-04-15 21:40:23 +00:00
Jim Van Verth
dcde69b84e Direct3D: Add UAV support to the root signature
The previous structure of the root signature was:
0: root CBV
1: sampler descriptor table (if any)
2: SRV descriptor table (if any)

SRVs and UAVs can be in the same descriptor table, so they will share
that, but swap it with the sampler so we can have texture-less root
signatures. So new format is:
0: root CBV
1: SRV/UAV descriptor table (if any)
2: sampler descriptor table (if any)

Change-Id: Ibf2b28ed3cfce98e55785682e2009c52a29fda97
Bug: skia:10446
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397139
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2021-04-15 20:45:02 +00:00
Brian Osman
102d6e5a63 Add test case for sample() with color and various forms of coords
Demonstrates a bug that was introduced here:
  https://skia-review.googlesource.com/c/skia/+/396021

Bug: skia:11867
Change-Id: Iaa6521bdeb4c05b0b91f4df43505e9983106f964
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397148
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-04-15 20:34:42 +00:00
Michael Ludwig
70fae35842 Preserve winding scale for outer edges in AA triangulation
More details are in the bug, but the specific test case gets an
overlap region in the AA outset geometry for the left and right shapes.
Additionally, the mitered outset for the left shape is collinear with
the bottom of the right shape, so the winding of exterior edge of
the overlap region is updated to +2.

When determining the polygons to fill, this +2 on the outer edges
violates the winding rules that normally ensure the interior polygons
(that use +/-2 instead of +/-1) are always filled.

It appears a similar bug fix was added here:
https://skia-review.googlesource.com/c/skia/+/141952/
but then didn't survive a heavy refactor later:
https://skia-review.googlesource.com/c/skia/+/215094

To the best of my knowledge, this is achieving the same result as the
original fix but is updated to preserve winding scale for interior
polygons with overlap regions (the code checks for these, but they
seem pretty rare to me).

Bug: 1197461
Change-Id: I0d32820af8cfec92c46114aeaa58b6e340abdfca
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397140
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2021-04-15 20:31:12 +00:00
Adlai Holler
387309c8bb Fall back to unordered DAG if we go over budget
This case is exceedingly rare, but we need to handle it anyway.

Bug: skia:10877
Change-Id: I6ba219487e4616ff24f2c087b3fcac957d2523f7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396816
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-15 19:49:52 +00:00
John Stiles
f35853a4a2 Clarify output from rewrite_includes assertion.
Previously, the conflicting header names were printed between several
lines of "boilerplate" text, and without any explanatory text. This
made them difficult to notice. The assertion now has an explanatory
message and prints the conflicting filenames directly at the point of
the assertion.

Before:
---
Running presubmit upload checks ...
tests/sksl/dslfp GrSwizzle.h /Users/johnstiles/skia/src/gpu/GrSwizzle.h
Traceback (most recent call last):
  File "tools/rewrite_includes.py", line 60, in <module>
    assert file_name not in headers
AssertionError

** Presubmit ERRORS ** (etc)
username$ _

After:
---
Running presubmit upload checks ...
Traceback (most recent call last):
  File "tools/rewrite_includes.py", line 61, in <module>
    assert file_name not in headers, message
AssertionError: Header filename is used more than once!
- tests/sksl/dslfp/GrSwizzle.h
- /Users/johnstiles/skia/src/gpu/GrSwizzle.h

** Presubmit ERRORS ** (etc)
username$ _

Change-Id: I2b6848ef82c4b1c6d4b5577a76969785e5e122bb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397149
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-04-15 19:44:32 +00:00
Herb Derby
3910bc9b4c introduce SkCanvas::onDrawGlyphRunList
With this change, there is no need to produce a SkTextBlob when
using the drawGlyph, drawSimpleText, or drawString apis. These
calls just produce a light weight wrapper sending the wrapper
to onDrawGlyphRunList for rendering.

For recording, recording canvas converts the SkGlyphRunList into
a blob, and calls SkRecorder::onDrawTextBlob.

Remove unused call: drawPosTextCommon.

Change-Id: I173ba2793f74b521b33a6fb3dbd8d98945216a3b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/388719
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2021-04-15 19:44:24 +00:00
Brian Osman
6860db769b Insert newlines in generated FP constructors
Cleans up registerChild calls, which were all on one long line.

Change-Id: I2b665b033edb88cf1de5e4da433833c0be26c92b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397147
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-04-15 19:00:22 +00:00
skia-autoroll
665920e9b9 Roll skcms from 163066c2a041 to a638db877ef8 (1 revision)
https://skia.googlesource.com/skcms.git/+log/163066c2a041..a638db877ef8

2021-04-15 mtklein@google.com require 3 or 4 B2A output channels

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 brianosman@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: brianosman@google.com,mtklein@google.com
Change-Id: I4a4834a7a01cf6d4855b40d6da47af6e29f1d11e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397122
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-15 18:26:22 +00:00
Stephen White
c204e5f765 Dawn: update fences to new API.
Bug: skia:11855
Change-Id: I77ed8b93efb1a9d806f6bec3963c57b7ce16fe4d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397138
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Stephen White <senorblanco@google.com>
2021-04-15 18:04:42 +00:00
Jim Van Verth
eefde6ffcc Clean up D3D12 shader compilation
Adds in printing of shaders and better matches other backends.

Change-Id: Ie2d7bed201e3d0a8d76262ee454632ec46b7e0aa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/397137
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-04-15 17:33:24 +00:00