Commit Graph

51289 Commits

Author SHA1 Message Date
Brian Salomon
86d07fd01c Remove unused SkImage YUVA factories.
Bug: skia:10632
Change-Id: Icb27e44d234063ab049fef95587f474323d7ada9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321537
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-10-02 19:35:34 +00:00
Florin Malita
71bcfef9f7 [skottie] Auto-resize and VAlign support for point text
Auto-resizing and vertical alignment require a non-empty text box.  But
currently, the presence of the text box is used to discriminate between
point text [1] and paragraph text [2].

In order to support auto-scaling and v-alignment for point text, we must
decouple the text mode encoding from the text box:

  * introduce and explicit LinebreakPolicy property for skottie::Shaper,
    and use it to control line breaking instead of the text box presence
  * by default, the line breaking policy is initialized per existing
    AE/BM semantics: non-empty text box -> paragraph mode,
    empty box -> point mode
  * the policy can be overridden via the PropertyObserver APIs to enable
    point mode auto-resizing and vertical alignment

[1] https://helpx.adobe.com/after-effects/using/creating-editing-text-layers.html#enter_point_text
[2] https://helpx.adobe.com/after-effects/using/creating-editing-text-layers.html#enter_paragraph_text

Change-Id: I007144283a31a2faa579d7eec82af72af3d540cb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321788
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2020-10-02 19:33:35 +00:00
Greg Daniel
b509bbb81f Remove some unneed read access from vk srcAccessMasks.
There is not need to have read accesses list in the srcAccessMask of
barriers. This is cause the srcAccessMask is used to make writes to
memory available and reads obviously have no writes.

Change-Id: I2fb1eca04d6f216bc63e200ad36bacdb40bf8146
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321785
Auto-Submit: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-10-02 19:21:04 +00:00
Ethan Nicholas
a3f22f1704 Revert "Revert "moved SkSL FloatLiteral data into IRNode""
This reverts commit a0c82f08df.

Change-Id: Ic2e93591c64992ec22e477bd0975d71954bef1c6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321469
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2020-10-02 19:18:59 +00:00
John Stiles
6d69608621 Store a unique_ptr* for a candidate's parent statement.
This will later allow us to rescan parent statements independently,
instead of performing a full rescan of the entire Program on each
iteration.

Change-Id: Id86e139d81125bc529aba9453cba5606d1041908
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321462
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-10-02 19:00:14 +00:00
Greg Daniel
8cc5f19f43 Always bind input attachment to all pipelines in subpasses that uses one.
The vulkan spec says that if a subpass has an input attachment that the
input attachment descriptor set must be bound to all pipelines in that
subpass. This includes pipelines that don't actually use the input
attachment.

Bug: chromium:1134454
Change-Id: I9a544a9a457dde80d315010a626ae74eb422bb9b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321779
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-10-02 17:42:34 +00:00
Greg Daniel
36366209d4 Require stencil bits on wrapped GrBackendRenderTargets to 0, 8, or 16.
This will allow us in a follow on change to put in a "fake" gl stencil
format for the wrapped FBO.

Bug: skia:10727
Change-Id: Iba1eca5114b34d25e6a220591d28a20f7b36b12b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321545
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-10-02 16:15:44 +00:00
Heather Miller
93f22bc46b Update release notes for M87 branch cut, M88 begin
Bug: skia:
Change-Id: Id4cc2f42389dac1e087026fee5c0df0eff4e89c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321776
Reviewed-by: Heather Miller <hcm@google.com>
Auto-Submit: Heather Miller <hcm@google.com>
Commit-Queue: Heather Miller <hcm@google.com>
2020-10-02 14:36:34 +00:00
Kevin Lubick
7d96c5cdd3 [canvaskit] Fix computeTightBounds
I noticed it was broken and untested when writing docs.

Change-Id: I5254b7bd50fde8a361c72ccbd7380809d31ccc08
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321464
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2020-10-02 14:06:24 +00:00
Greg Daniel
17b0c755b4 Remove unsized gl stencil support.
We don't believe this is needed anymore and was mostly here to support
old desktop GL

Bug: skia:10727
Change-Id: Iab35ec7d6ed64d817aed57c38864932cc417c68e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321541
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-10-02 13:21:14 +00:00
Robert Phillips
326f1d702b Accumulated non-substantive changes
Change-Id: I0c6f48da9acefcdd954c9b1b54501ef48465e537
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/310980
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-10-02 12:59:54 +00:00
Brian Osman
2d403f203b Revert "Convert sksl_frag.sksl to an IRIntrinsicMap"
This reverts commit 3e40ce0937.

Reason for revert: Lots of bad Vk images from Pixel2/3

Original change's description:
> Convert sksl_frag.sksl to an IRIntrinsicMap
>
> Did some related cleanup:
> - We were setting the IRGenerator's fIntrinsics to the (empty) GPU map
>   while converting the GPU/frag/vert source. Make the IR generator
>   support a null intrinsic map, so we can (more correctly) structure the
>   compiler's constructor.
> - Use explicit types on all calls to findAndInclude.
> - Move the assert back into grab_intrinsics - every converted include
>   only contains supported elements (and will continue to do so).
>
> Change-Id: I80ebb247107dde656946858bf2cd1f50a03f67d3
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321496
> Reviewed-by: John Stiles <johnstiles@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

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

Change-Id: I6f11366971bfd252f11d30c48e2e776d30458933
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321683
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-10-02 11:17:56 +00:00
skia-autoroll
4896b3369d Roll Chromium from 085332bfbb3a to 1693b2839ab9 (532 revisions)
085332bfbb..1693b2839a

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: I2b63e0d2763a5815ad5e1e9154ed70bdecc082e6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321650
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-02 04:53:08 +00:00
skia-autoroll
b62286fb62 Roll SwiftShader from 5e947adaf26e to 375fee944c76 (2 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/5e947adaf26e..375fee944c76

2020-10-02 zzyiwei@google.com Use vndk/window.h instead of the system one
2020-10-01 swiftshader.regress@gmail.com Regres: Update test lists @ 5e947ada

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 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:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: brianosman@google.com
Change-Id: If92e2644c75129fbd626a7493be89035d8ccdbba
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321649
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-02 04:51:49 +00:00
skia-autoroll
4ddc48e5ab Roll ANGLE from b09f16ee7aeb to 1fd3e5d89a8f (8 revisions)
b09f16ee7a..1fd3e5d89a

2020-10-02 jmadill@chromium.org Test Runner: Fix race in watchdog timeouts.
2020-10-02 syoussefi@chromium.org Vulkan: Fix UtilsVk clear in non-zero subpass
2020-10-02 jmadill@chromium.org Revert "Vulkan:Add debug labels for OpenGL calls"
2020-10-02 jmadill@chromium.org Add a standalone GN isolate map.
2020-10-01 jonahr@google.com Suppress MultisampledRenderToTextureBenchmark on Pixel2/GLES
2020-10-01 syoussefi@chromium.org Skip MSRTT tests on Nvidia/Windows7
2020-10-01 b.schade@samsung.com Vulkan: Change sampleCoverage calculation
2020-10-01 lehoangq@gmail.com Metal: Implement transform feedback

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: dEQP-GLES3.functional.multisample.fbo*sample_coverage*
Change-Id: I85897c5a1daa356f38a61a748e51ac100d987302
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321647
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-02 04:48:04 +00:00
skia-autoroll
5c09106d92 Roll Dawn from da5828c06b4c to 16ebcf601d7f (1 revision)
https://dawn.googlesource.com/dawn.git/+log/da5828c06b4c..16ebcf601d7f

2020-10-01 brandon1.jones@intel.com Limit Clear Color Values to 2^24 For Integer Formats

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 cwallez@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: cwallez@google.com
Change-Id: Id4e7ba690012bc7074857f3cd1772e25e69aeb05
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321648
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-02 04:46:44 +00:00
Herb Derby
a80ce1a36d remove SkMakeSpan use ctor parameter deduction
Change-Id: I3a1b12f7eb906fe105eb7e9f6bc10e3745f61528
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320264
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2020-10-02 01:41:03 +00:00
Brian Osman
3e40ce0937 Convert sksl_frag.sksl to an IRIntrinsicMap
Did some related cleanup:
- We were setting the IRGenerator's fIntrinsics to the (empty) GPU map
  while converting the GPU/frag/vert source. Make the IR generator
  support a null intrinsic map, so we can (more correctly) structure the
  compiler's constructor.
- Use explicit types on all calls to findAndInclude.
- Move the assert back into grab_intrinsics - every converted include
  only contains supported elements (and will continue to do so).

Change-Id: I80ebb247107dde656946858bf2cd1f50a03f67d3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321496
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-10-01 22:13:03 +00:00
Heather Miller
219d412d13 Update Skia milestone to 88
Change-Id: I8d01f643e1cb7327713959ea744de3ae8c82bb6e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321520
Reviewed-by: Heather Miller <hcm@google.com>
Commit-Queue: Heather Miller <hcm@google.com>
2020-10-01 21:26:03 +00:00
Brian Osman
8e2ef02855 Support variables in the intrinsic map, clone them into Programs
As a first step, convert sksl_pipeline.sksl to an IntrinsicMap (rather
than inherited element list). This makes the new code operate on
sk_FragCoord (which was previously being shared by all runtime effect
programs).

The new unit test angered TSAN, and now runs without complaint.

Also finish converting the .fp intrinsics over, so those don't need an
inherited element list either. And while doing that, refactor that
parsing to match all of the others. FP was uniquely implementing
processIncludeFile itself, rather than reusing the pattern of other
pre-include parsing.

The meat of the CL is the subtle changes in Compiler, and the logic in
cloneBuiltinVariables. Note that we need to clone the global variable
declaration element (because one of the goals is to get rid of shared
and inherited program elements), but also the variable itself (and the
new copy needs to live in the program's symbol table).

Bug: skia:10589
Bug: skia:10679
Bug: skia:10680
Change-Id: Ied352f8434dac2b8eacb4e515b014b6af7b57d20
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319023
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-10-01 20:30:33 +00:00
John Stiles
61e75e3f88 Replace set of entrances with boolean.
We don't use the entrance ID values anywhere; we only check to see if
the block is reachable or not.

Change-Id: I0988e6c1999936de25dd04404409b736d8ad14f5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321540
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-01 20:30:32 +00:00
John Stiles
2c1e492224 Convert Analysis::NodeCount to NodeCountExceeds.
The inliner generally only cares whether a function has 50 nodes or
less. Once we hit the 50th node, we can stop counting.

Change-Id: I92918989a9b3b5b73c1d1f13fa25c9adfa5b7e40
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321198
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-10-01 20:25:29 +00:00
Florin Malita
efe6c11b15 [sksg] Fix uninitialized DashEffect attribute
All SkSG attributes require a default initializer.

TBR=
Change-Id: I15ee6ea56f1d07375af5a623e95321bd80da2e68
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321470
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-10-01 20:25:27 +00:00
skia-autoroll
f5c90ebd65 Roll ANGLE from fa082bb58ba7 to b09f16ee7aeb (16 revisions)
fa082bb58b..b09f16ee7a

2020-10-01 jmadill@chromium.org Don't pull in Vulkan headers in Skia standalone.
2020-10-01 cnorthrop@google.com Capture/Replay: Minor fixes for MEC
2020-10-01 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from fcb22ecf0f7e to 615fbe6cbc78 (6 revisions)
2020-10-01 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from b042f4e70879 to 5e947adaf26e (4 revisions)
2020-10-01 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from e2b329a75b6a to 7a78cc629cca (3 revisions)
2020-10-01 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 18cdc3179c58 to 5efa84e265f7 (627 revisions)
2020-10-01 jmadill@chromium.org Integrate Skia Gold with restricted trace tests.
2020-10-01 jmadill@chromium.org Drop isolated perf output arg in test runner.
2020-10-01 timvp@google.com Vulkan: Always reset during createPipelineLayout()
2020-10-01 ianelliott@google.com Vulkan:Add debug labels for OpenGL calls
2020-09-30 courtneygo@google.com Move LayoutCaches to ShareGroup
2020-09-30 cclao@google.com Vulkan: disable glFlush deferral optimization for QualComm GPUs.
2020-09-30 jmadill@chromium.org Fix info collection on Android without Vulkan.
2020-09-30 jmadill@chromium.org Additional perf test cleanup & functionality.
2020-09-30 courtneygo@google.com Vulkan: Check that its okay to add commands
2020-09-30 syoussefi@chromium.org Vulkan: Constants for unpacked D/S attachment indices

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: Manually verify Cut the Rope doesn't crashTest: Test: angle_perftests --gtest_filter="*Trace*"
Change-Id: I07c6099e1cf1506ed9fb5cd85b4b470386db2c20
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321479
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-01 20:20:23 +00:00
Greg Daniel
280a4de999 Fix vulkan input usage flag for VulkanWindowContext.
Change-Id: I8ab093c68e0c70d78722589bcfd28934f2cf5cb9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321517
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-10-01 20:20:22 +00:00
Michael Ludwig
6d32686824 Remove unused field from DeviceCM
The SkRasterClip on DeviceCM appears to be unused and just increased the
size of that struct. Now the clip is tracked on the MCRec or within
SkBitmapDevice itself.

This adjusts the reserved size for DeviceCM to match (as reported on my
machine), and moves it into an anonymous namespace.

Change-Id: Ifa8635f839fc3d75339a64c9378ee054fe0cc071
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321250
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-10-01 20:15:18 +00:00
Brian Salomon
8ba54ea3a2 GrRenderTargetContext takes release proc helper.
Avoids double call of release proc on failure.

Bug: skia:9832
Change-Id: I517c010376ba73f6d98c95f3453c8b0f9a5a299a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321461
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-10-01 20:15:18 +00:00
Brian Osman
28f11bf59d Remove unused variable from IR generator
Change-Id: Ib97cbf2e20580d3b9e54a5ffe793013ec97d4892
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321539
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>
2020-10-01 20:10:13 +00:00
Greg Daniel
0eca74cd2c Move bytesPerPixel query off of GrCaps and add bytesPerBlock query.
Part of this change is to move some of this static format information
off of GrCaps since it is not cap dependent in anyway. This allows us
to the need for caps in many places. Also changes the low level format
query to be based off of bytes per block so it can be shared for
compressed and non compressed formats.

This change will also make it easier to add stencil/depth formats in
follow on change since we don't have to fill in a whole caps
FormatInfo block just so we can get the bytesPerPixel which is all
they need.

Bug: skia:10727
Change-Id: I2e6fdabf3ed699b4145ef9e6f0a73078d32a0444
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321463
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-10-01 20:10:12 +00:00
Brian Osman
a0c82f08df Revert "moved SkSL FloatLiteral data into IRNode"
This reverts commit 135e237656.

No-Tree-Checks: true
Change-Id: I7e9dd2148f7b2a8dee1e49a9a9cc593e0d7ceb6e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321460
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-10-01 13:37:42 +00:00
skia-autoroll
4f09dd47da Roll SwiftShader from b042f4e70879 to 5e947adaf26e (4 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/b042f4e70879..5e947adaf26e

2020-10-01 capn@google.com Fix clamping cube face coordinates to [0.0, 1.0) range
2020-09-30 nicolascapens@google.com Fix delegating eglCreateWindowSurface to CreatePlatformWindowSurface
2020-09-30 amaiorano@google.com Fix GN build
2020-09-30 amaiorano@google.com Optimize transcendentals for Subzero

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 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:Test-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Debug-All-SwiftShader
Bug: None
Tbr: brianosman@google.com
Change-Id: Ib41a8e195041b472b98052693feea1ed8cc25fab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321342
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-01 04:49:05 +00:00
skia-autoroll
cdc9e74231 Roll Chromium from cc47e0cdb922 to 085332bfbb3a (612 revisions)
cc47e0cdb9..085332bfbb

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: I31048b96467f2fcaef8b961511e6afca4dcfee07
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321340
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-01 04:43:45 +00:00
skia-autoroll
8c337a36b2 Roll Dawn from ad421a248adb to da5828c06b4c (2 revisions)
https://dawn.googlesource.com/dawn.git/+log/ad421a248adb..da5828c06b4c

2020-09-30 rharrison@chromium.org Add Tint SPIRV->SPIRV to fuzzing code path
2020-09-30 cwallez@chromium.org TextureFormatTest: Test components not present in the format.

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 cwallez@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: cwallez@google.com
Change-Id: I5781e1af2b16c2e592f863fec9ea419b15f7ed7f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321396
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-10-01 04:40:15 +00:00
Brian Salomon
8e0aa441a5 Get GrBackendRenderTarget's sample count from MtlTexture.
Instead of being passed separately.

Check sample count in various onWrap methods in GrMtlGpu.

Bug: skia:9832


Cq-Include-Trybots: luci.skia.skia.primary:Test-iOS-Clang-iPhone8-GPU-AppleA11-arm64-Release-All-Metal,Test-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Release-All-Metal,Test-iOS-Clang-iPadPro-GPU-PowerVRGT7800-arm64-Release-All-Metal,Test-iOS-Clang-iPhone11-GPU-AppleA13-arm64-Release-All-Metal,Test-iOS-Clang-iPhone6-GPU-PowerVRGX6450-arm64-Release-All-Metal,Test-Mac10.15-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Release-All-Metal
Change-Id: If5813db95b07f5d272e80920486f461cc5a587fc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320956
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-09-30 20:40:33 +00:00
Robert Phillips
692915e475 Have the GrShadowRRectOp make use of the thread-safe view cache
Maybe a hair faster for OOP-R/DDL-style rendering of the shadow_utils GM.

Bug: 1108408
Change-Id: If8827f7a765b8fc231f7a37178b7a12dc78357ea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321159
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-09-30 20:27:33 +00:00
Robert Phillips
f3fc25ee80 Have GrMatrixConvolutionEffect use the thread-safe view cache
No discernable perf improvement for OOP-R/DDL-style rendering of the matrixconvolution* GMs.

Bug: 1108408
Change-Id: Iea016feb2a8a0e5303a64ee8166c3ef089bb2649
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321137
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-09-30 20:10:48 +00:00
John Stiles
d2bb315cdd Update TextureEffect to avoid extraneous out variable.
Using return statements generates better code when there are no early
exits.

Change-Id: I18edd49991324aaf1473b614261862d273eac541
Bug: skia:10549
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321237
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2020-09-30 20:07:13 +00:00
Brian Osman
3887a01433 Add Variable::fBuiltin, to track Variables owned by pre-includes
Similar to the same field on Enum and FunctionDeclaration, will be used
to facilitate cloning builtin variables into Programs that use them.

Bug: skia:10589
Change-Id: Ic63701c61ee4658a5ec72adb506cc96aa0b2836f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321196
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-09-30 20:05:43 +00:00
Brian Salomon
2889e69680 Return GrBackendTexture from SkPromiseImageTexture by value.
Makes it simpler to call methods that update the internal ref counted
state.

Change-Id: Iecefab2c14ff13eae2fa34eafdcc7e031b3c85b0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320957
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-09-30 19:50:03 +00:00
John Stiles
52e9a7a0ba Update MatrixEffect to avoid extraneous out variable.
Using return statements generates better code, e.g.:
Before:
    vec4 _11_2_MatrixEffect_Stage1;
    {
        vec4 _12_4_output;
        vec4 _13_5_0_TextureEffect_Stage1;
        /* sample from texture */

        _12_4_output = _13_5_0_TextureEffect_Stage1;

        _11_2_MatrixEffect_Stage1 = _12_4_output;
    }

After:
    vec4 _13_2_MatrixEffect_Stage1;
    {
        vec4 _14_5_0_TextureEffect_Stage1;
        /* sample from texture */

        _13_2_MatrixEffect_Stage1 = _14_5_0_TextureEffect_Stage1;
    }

Change-Id: Ifb403b5aa4d0a0a38cef7a75ae2468fc9e6c0bf7
Bug: skia:10549
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321121
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-09-30 19:20:03 +00:00
Ethan Nicholas
6e86ec95f6 moved SkSL ExternalFunctionCall's data into IRNode
Change-Id: Ie953b6486ee2efb4795303f91c154881e8e59dcb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320767
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-09-30 19:14:23 +00:00
John Stiles
0323356e78 Simplify generated GLSL code for trivial FPs.
By using `return` directly instead of creating a temporary `_output`
variable, we generate less code and simplify the final GLSL output.

In the case of OverrideInputFragmentProcessor, the ternary expression
is performed on a `layout(key)` bool and will always be optimized away.

Before:
        vec4 _10_ConstColorProcessor_Stage1_c0;
        {
            vec4 _12_output;
            _12_output = ucolor_Stage1_c0;
            _10_ConstColorProcessor_Stage1_c0 = _12_output;
        }

After:
        vec4 _8_ConstColorProcessor_Stage1_c0;
        {
            _8_ConstColorProcessor_Stage1_c0 = ucolor_Stage1_c0;
        }


Change-Id: Ic3fd446345aa73e3936d1759443b80b41f5468f0
Bug: skia:10549
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320962
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-09-30 19:09:23 +00:00
Stephen White
f63d8b7073 Dawn: remove persistent TextureView from GrDawnTexture.
For mipmaps, the texture view we need depends on the mipmap mode. In
particular, for mipmap "none" mode, we need a view which ignores
everything but mip 0. So remove the persistent one.

Change-Id: I37a5e8a299edf423b67fd85135d6fbd9d26e62a7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320636
Commit-Queue: Stephen White <senorblanco@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-09-30 18:17:43 +00:00
Steven Moreland
db9172d768 Avoid heap initialization for skia allocations.
Android is turning on a flag which zero's all malloc calls for security
purposes. Since allocations with sk_malloc_flags are potentially very
large, and this flag is known to regress some HWUI usecases, disabling
this initialization for graphics buffers (which we know will get filled
anyway).

Bug: 131355925
Test: removes large hwuimacro regressions w/ heap initialiation
Change-Id: I7ae11b075f88d03c0a9709928ad7bbbc3b04f73f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320266
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Auto-Submit: Steven Moreland <smoreland@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2020-09-30 18:01:53 +00:00
Brian Osman
268380613f Move VariableReference ref-adjusting into helper functions
Change-Id: If2b1e8f89730bfff9e08c1ff5f5cb02c16088d86
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321117
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>
2020-09-30 17:53:03 +00:00
Robert Phillips
a6919c655e Make GrRectBlurEffect use the thread-safe view cache
This, maybe, yields a slight perf improvement for the blur_matrix_rect
GM but, regardless, is good form.

Bug: 1108408
Change-Id: I6d589cc0f08f4264419ab33f27ac5a503cd036e8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320933
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-09-30 17:28:53 +00:00
John Stiles
3fb66b557d Calculate texture clamping X/Y coordinates in parallel.
The X and Y values of `clampedCoord` were being calculated and stored
separately, even in cases where work could easily be done in tandem.
Updated the code so that we use .xy when it makes sense to do so.

This CL is a partial re-attempt of http://review.skia.org/318436 but
changing only one variable instead of three.

Change-Id: I8cab3c2225e1d95bc77371f85d46ab45a184e145
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321116
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-09-30 17:25:23 +00:00
John Stiles
80ccdbd869 Inline trivial single-argument constructors directly.
We don't need to create a temporary variable for expressions like
`half3(x)`.

Change-Id: Ie0fa6a6dfb3d77d4372f96c676d3081f7e278852
Bug: skia:10786
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320960
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-09-30 17:06:14 +00:00
Michael Ludwig
1283d559f2 Fix GrClipStackClip::preApply to report kClippedOut
Previously, this would only return kClippedOut if the draw didn't
intersect with the device bounds. Now takes into account the bounds of
any identified single rrect/rect clip element and reports kClippedOut
if the draw does not intersect the element.

This fixes the bug identified in flutter where draws would appear outside
the clip. Within the problematic drawPoints call, each segment would turn
into a separate rect to draw, and if the rect was fully outside the clip,
it would incorrectly pass preApply and then not get cropped properly since
it didn't actually intersect the crop rect.

This only presented as a bug when SK_DISABLE_NEW_GR_CLIP_STACK was defined
(the current behavior for flutter). The new GrClipStack preApply already
reported kClippedOut in this scenario.

Bug: https://github.com/flutter/flutter/issues/66719
Change-Id: Idd810efcce4dfb6b51745d4a7a2ea66de9d4f46b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320965
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-09-30 16:59:33 +00:00
Robert Phillips
aac5728a82 Make GrRRectBlurEffect use the thread-safe uniquely-keyed view cache (take 2)
This yields a ~8% performance improvement on OOP-R/DDL-like rendering of the simpleblurroundrect GM.

Bug: 1108408
Change-Id: I710c75b73a395b2280abf0c5af528e0f6731326d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/311720
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/320917
2020-09-30 15:54:43 +00:00