Commit Graph

51634 Commits

Author SHA1 Message Date
Brian Salomon
694ff17357 Revert "Revert changes to unbreak bots."
This reverts commit 49721c8437.

Reason for revert: fixed double usage of plane release context in
 YUVUtils.

Original change's description:
> Revert changes to unbreak bots.
>
> f01a9d9020
> is the culprit
>
>
> Revert "GrRefCntedCallback has Make function."
>
> This reverts commit b2c42140ea.
>
> Revert "Add SkImage::MakeFromYUVATexturesCopyToExternal"
>
> This reverts commit f01a9d9020.
>
> Bug: skia:10632
> Change-Id: Ief076f168b63ff8ca15b607163a13d5f52a733d2
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331798
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com

Change-Id: I41cdfe0d5b8587f85fae0c804c059c0d6ff92800


Bug: skia:10632
Change-Id: I41cdfe0d5b8587f85fae0c804c059c0d6ff92800
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331876
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-11-05 14:35:23 +00:00
skia-autoroll
8cdba3e3fa Roll ANGLE from 6372a56f3a15 to 1e494cae8d48 (7 revisions)
6372a56f3a..1e494cae8d

2020-11-05 b.schade@samsung.com Vulkan: Add support for EXT_copy_image
2020-11-05 m.maiya@samsung.com LuminanceWorkaroundTextureSwizzleBug test bug fix
2020-11-04 jdarpinian@chromium.org Reland "ANGLE_platform_angle_device_context_volatile_* extensions"
2020-11-04 geofflang@google.com Mark uniform samplers in an array unused per element
2020-11-04 syoussefi@chromium.org Vulkan: Don't break the render pass on scissor change
2020-11-04 m.maiya@samsung.com Vulkan: Enable GL_EXT_buffer_storage extension
2020-11-04 ianelliott@google.com Vulkan: Suppress VUID-VkImageViewCreateInfo-usage-02652

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 bsalomon@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: bsalomon@google.com
Test: Test: dEQP-GLES31.functional.copy_image.*
Change-Id: I888ff31834f6e1ce9d424aaa1f08eee1affaa7e6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332476
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-11-05 04:55:35 +00:00
skia-autoroll
3b9bf7a82b Roll Dawn from db8766bb239b to 6564890116fd (6 revisions)
https://dawn.googlesource.com/dawn.git/+log/db8766bb239b..6564890116fd

2020-11-04 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from de6938789ccb to 77f7bb5b005d (18 revisions)
2020-11-04 cwallez@chromium.org Reenable DepthBias tests on Swiftshader
2020-11-04 enga@chromium.org Support sampling depth and stencil of combined d/s formats
2020-11-04 cwallez@chromium.org Fix examples when using the wire.
2020-11-04 cwallez@chromium.org Rolling 7 dependencies
2020-11-04 jiawei.shao@intel.com Remove DAWN_NATIVE_EXPORT declaration from dawn_platform::Platform

Also rolling transitive DEPS:
  https://chromium.googlesource.com/chromium/src/third_party/jinja2 from b41863e42637 to a82a4944a7f2
  https://chromium.googlesource.com/chromium/src/third_party/markupsafe from 8f45f5cfa000 to 0944e71f4b2c

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: Ia5394662095acdbb56bff3046b3474a939212ab9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332458
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-11-05 04:50:00 +00:00
skia-autoroll
dfb912fda0 Roll Chromium from 1f9589cf9ca4 to e1d559cf7760 (402 revisions)
1f9589cf9c..e1d559cf77

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 bsalomon@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: bsalomon@google.com
Change-Id: I042f3ec1dcb75b53b7c931b6ea5ab34bf529b8f0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332456
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-11-05 04:48:15 +00:00
skia-autoroll
906501df4f Roll SwiftShader from 31e28d20f878 to ad54c71632cc (4 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/31e28d20f878..ad54c71632cc

2020-11-04 capn@google.com Fix Vulkan benchmarks build
2020-11-04 capn@google.com Fix unaligned access on depth values
2020-11-04 capn@google.com Fix LLVM alloca array size type
2020-11-04 capn@google.com Resolve MSan symbols dynamically

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 bsalomon@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: bsalomon@google.com
Change-Id: Ib6eca8ffeb4c4c62664b0ac909619e0e06fa63d2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332457
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-11-05 04:44:55 +00:00
John Stiles
68dcf542b7 Migrate CrbugOssfuzz21688 to a golden-output test.
Change-Id: I2c077e723d123b01fbcc8fe841ee1f3d28dc152d
Bug: skia:10694
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332037
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-11-04 22:34:13 +00:00
Brian Osman
91292e9482 Runtime Effects: Support 'uniform shader' (vs. 'in shader')
The previous behavior leaked Skia-internal concepts into public SkSL.
Users coming from GLSL will expect that bindable/sampleable objects are
uniform (just like texture2D). This keeps the old support around (and
tested), but updates all of our examples to use 'uniform'.

Bug: skia:10679
Change-Id: I0c98162f5e21dad7014d9778ceb26143d2f6030e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332376
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-11-04 22:29:53 +00:00
John Stiles
95acbbc3c9 Fix crash when comparing against a negated constant vector.
This CL solves the fuzzer crash. Constant propagation of the negative
sign into the vector will be investigated in a followup CL.

This CL also adds a few cleanups into IRGenerator::constantFold.

Change-Id: If73a4fe2a5777265e7d43cc4f482653a38cb59af
Bug: oss-fuzz:26830, oss-fuzz:26789
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332261
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2020-11-04 22:17:53 +00:00
John Stiles
6c88ea1278 Create unit test for comparison against a negated constant vector.
Change-Id: Ibc1a8d3ebbf62cc55d013f7d9146f6b155d11da2
Bug: oss-fuzz:26830, oss-fuzz:26789
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332377
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-11-04 22:15:23 +00:00
Tyler Denniston
57154998a8 [svg] Add plumbing for bottom-up attribute parsing
One significant source of boilerplate in the SVG frontend is the
plumbing to ensure type safety all the way down from the XML layer to
the SkSVGNode layer. This is mostly an artifact of the top-down parsing
approach currently used by the SkDOM -> SkSVGDom building process.

One way to help remove some boilerplate is to perform attribute parsing
bottom-up, where each SVG node knows how to parse and populate its own
attribute values from a string-valued KV pair.

Additionally, bottom-up parsing allows us to support the case of the
same SVG attribute name having different meanings on different nodes
(e.g. the "type" attribute has different meaning on <feTurbulence>
versus <feColorMatrix>).

This CL adds some initial work to start us down that road, and ports the
attributes previously added for <feTurbulence> to use the new code path.

Change-Id: I2973cfab96891475d05ebf1228117626ca48ef4d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331477
Commit-Queue: Tyler Denniston <tdenniston@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-11-04 21:48:03 +00:00
Ben Wagner
450eb0468d Implement font family names on iOS.
Tries to find and use newer API if available, with fallback to
older API as needed.

This also fixes family names for custom font collections.

Bug: skia:10850
Change-Id: Ie3c3cc5f342c78cbe0015584d84063435358e59e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332177
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-11-04 21:09:33 +00:00
skia-autoroll
96dd402cd8 Roll ANGLE from 068bb086e1c8 to 6372a56f3a15 (53 revisions)
068bb086e1..6372a56f3a

2020-11-04 jmadill@chromium.org Gold trace tests: Add logging for filter misses.
2020-11-04 syoussefi@chromium.org Vulkan: Make ImageHelper::flushStagedUpdates take gl::LevelIndex
2020-11-04 jmadill@chromium.org Trace Gold Tests: Fix filter name.
2020-11-04 lehoangq@gmail.com Metal: Enable dEQP GLES3 tests on AMD
2020-11-04 ianelliott@google.com Vulkan: VVL errors once again cause dEQP tests to fail
2020-11-04 m.maiya@samsung.com Vulkan: Add support for VK_KHR_image_format_list extension
2020-11-04 lehoangq@gmail.com Metal: Add ES3_METAL to ANGLE_ALL_TEST_PLATFORMS_ES3
2020-11-04 xiaoxuan.liu@arm.com Vulkan display mode: fix skia build failure
2020-11-04 lehoangq@gmail.com Metal: fix max varyings, copyImage between mips, depth fmt
2020-11-04 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from b5bf82693f85 to 19f01495a8a1 (6 revisions)
2020-11-04 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from 1b2f8307f21d to 128608f6da3a (17 revisions)
2020-11-04 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from 5735576f87be to bcf5b211db92 (4 revisions)
2020-11-04 lehoangq@gmail.com Metal: Support tri-fan & line-loop with primitive restart
2020-11-04 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from ce54b897663f to 9c36b5262108 (443 revisions)
2020-11-04 syoussefi@chromium.org Vulkan: Fix scissor update in FramebufferVk::syncState
2020-11-04 xinghua.cao@intel.com Restrict to translate uniform block to StructuredBuffer
2020-11-04 ianelliott@google.com Refactor FrameCapture.cpp to use common utility
2020-11-04 syoussefi@chromium.org Vulkan: Fix use of uninitialized data in staged clears
2020-11-04 geofflang@google.com Revert "Vulkan: Add features to modify sampling parameters"
2020-11-03 courtneygo@google.com Fix presubmit failure with recent glslang update
2020-11-03 jmadill@chromium.org Gold Trace Tests: Handle test filter.
2020-11-03 jmadill@chromium.org Enable writing histogram-set-json-format.
2020-11-03 jmadill@chromium.org Don't print reuse warning when forcing new displays.
2020-11-03 stuartmorgan@google.com Fix copyright line format
2020-11-03 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from f7da52775714 to 5735576f87be (1 revision)
2020-11-03 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Tools from 3f747ee91e3b to 51c1c5ab56d5 (1 revision)
2020-11-03 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from e46399ddd2c7 to 1b2f8307f21d (7 revisions)
2020-11-03 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 7751fe38f474 to b5bf82693f85 (7 revisions)
2020-11-03 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from a64ace71870c to ce54b897663f (254 revisions)
2020-11-03 syoussefi@chromium.org Vulkan: Use dst access masks to determine if barrier is needed
2020-11-03 xiaoxuan.liu@arm.com Reland "Add support for Linux vulkan backend with VK_KHR_display"
2020-11-03 courtneygo@google.com Allow single threaded CommandProcessor
2020-11-03 jmadill@chromium.org Test Runner: Robustly handle unexpected crashes.
2020-11-03 m.maiya@samsung.com Vulkan: Bug fix in sRGBDecode logic
2020-11-02 jmadill@chromium.org Test Runner: Add ability to retry flaky tests.
2020-11-02 angle-autoroll@skia-public.iam.gserviceaccount.com Roll VK-GL-CTS from e69b9b7294af to 9e07e4424cd4 (5 revisions)
2020-11-02 thomasanderson@chromium.org Remove dependency on //build/config/linux:x11
2020-11-02 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from f2fabcd1994c to a64ace71870c (130 revisions)
2020-11-02 jmadill@chromium.org Expand suppression of new EGL test.
2020-11-02 syoussefi@chromium.org Noop clear of non-existing attachments.
2020-11-02 syoussefi@chromium.org Noop empty-scissor clears
2020-11-02 jmadill@chromium.org Revert "Add support for Linux vulkan backend with VK_KHR_display"
2020-11-02 jmadill@chromium.org Tests: Print warning when we hit display reuse limit.
2020-11-02 syoussefi@chromium.org Vulkan: Fix prerotation bug with glInvalidateSubFramebuffer
2020-11-02 amy.liu@arm.com Fix maxShaderAtomicCounters value.
2020-11-02 xiaoxuan.liu@arm.com Add support for Linux vulkan backend with VK_KHR_display
2020-11-02 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from 34ae8a475754 to f7da52775714 (8 revisions)
2020-11-02 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from f673b4e6ebf3 to e46399ddd2c7 (11 revisions)
2020-11-02 angle-autoroll@skia-public.iam.gserviceaccount.com Roll glslang from 740ae9f60b00 to 142cb87f803d (1 revision)
2020-11-02 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from e6c9497255c6 to 7751fe38f474 (3 revisions)
2020-11-02 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Headers from 320af06cbdd2 to 87451c55aa8b (1 revision)
2020-11-02 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Tools from ee0de094ddff to 3f747ee91e3b (1 revision)
2020-11-02 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 1e88b939ff30 to f2fabcd1994c (528 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 bsalomon@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: bsalomon@google.com
Test: Test: dEQP-GLES31.functional.shaders.opaque_type_indexing.atomic_counter.*vertex
Change-Id: Id78f218d29131ab2c073f494a6fd8d96aa08aad8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332357
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-11-04 21:07:13 +00:00
John Stiles
5c7e1a15fb Poison the GrMemoryPool's sentinel field when ASAN is enabled.
The fSentinel field can now serve as an ASAN barrier, to prevent wild
writes across pooled nodes.

It's also been moved to the very end of the Header so that it
immediately precedes the actual pooled node; this will make it easier to
catch wild writes that come before the front of the object. (Padding
between nodes, when there is any, should already able to catch wild
writes that extend off the back end of an object.)

Change-Id: Ibf20dbdc1bb45e012f4971a1cd39e5c94a5a938f
Bug: skia:10885
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332176
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-11-04 20:58:13 +00:00
Herb Derby
3e251dc3c2 constexpr SkCLZ and functions that use it
Change-Id: Ie737c0b4dc4d046742978ffff1c2f53a05dfe8f7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332259
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-11-04 20:11:33 +00:00
Adlai Holler
6ecfddbf95 Revert "Reland "Notify RTC when OpsTask is closed so it can drop ownership""
This reverts commit 3b8486afd3.

Reason for revert: Broke stencil preservation

Original change's description:
> Reland "Notify RTC when OpsTask is closed so it can drop ownership"
>
> This reverts commit 777f239a65.
>
> Assigns observer in GrRenderTargetContext constructor.
>
> Change-Id: Ie1d4a425eb959f7b822b5fc4988b2bb6ca2ed6a5
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/284733
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Change-Id: Ib72f6ef2bcfa820a130bf3d3b71e40c9a75f1d3f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332179
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2020-11-04 20:10:53 +00:00
Brian Osman
d7e7659cad Move GrShaderCaps from Program::Settings to Compiler
This ties the caps to the compiler instance, paving the way for
pre-optimizing the shared code. Most of the time, the compiler is
created and owned the GPU instance, so this is fine. For runtime
effects, we now use the shared (device-agnostic) compiler instance
for the first compile, even on GPU. It's configured with caps that
apply no workarounds. We pass the user's SkSL to the backend as
cleanly as possible, and then apply any workarounds once it's part
of the full program.

Bug: skia:10905
Bug: skia:10868
Change-Id: Ifcf8d7ebda5d43ad8e180f06700a261811da83de
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331493
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-11-04 19:38:33 +00:00
Leon Scroggins
f12d05d125 Implement SkPathBuilder(SkPathFillType)
Bug: skia:9000

This constructor is already declared; provide a definition.
Add a test.

Change-Id: Ic54ccffe0b1adf7c8c411e19a3fc9d825a5c9619
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331799
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-11-04 18:17:23 +00:00
Greg Daniel
007d97d699 Allow creating SkSurfaceCharacterizations directly for vk secondary CB context.
Bug: chromium:1144921
Change-Id: I9ca905eb9f2542aafbde25e0baa5430640277699
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331877
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-11-04 16:43:42 +00:00
Stephen White
541f2acf98 Dawn: update to RenderPassEncoder::SetIndexBufferWithFormat().
RenderPassEncoder::SetIndexBuffer() is deprecated.
Change-Id: Ie7b357df8bbee16fd08fa1bdf5e9cbedf11b259d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331495
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Stephen White <senorblanco@google.com>
2020-11-04 16:25:52 +00:00
John Stiles
3744b2a366 Revert "Re-enable -Wdeprecated-copy-dtor."
This reverts commit a8889403fd.

Reason for revert: breaking Build-Win-Clang-x86_64-Release-ANGLE, Build-Win-Clang-x86_64-Release-Shared, etc.

Original change's description:
> Re-enable -Wdeprecated-copy-dtor.
>
> This was mostly working already, because violating this warning would
> break one of our builds, Build-Debian10-EMCC-wasm-Release-WasmGMTests.
>
> Example: https://status.skia.org/logs/BmABdx9EQKaH89CcbwU2/605bf360-b5b1-4a72-9e9f-465444f7f36c
>
> This did require a fix to Dawn (thanks to cwallez@):
> https://dawn-review.googlesource.com/c/dawn/+/30701
>
> Change-Id: I17723bda02f13895f9e19ea2e94dc48c2cdb1572
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330741
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>

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

Change-Id: Id31265d4c39f8774f0668aaa54d8f6fc10de1ee7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332178
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-11-04 15:23:45 +00:00
Herb Derby
a5eff5d53a move subrun code to anonymous namespace
Change-Id: Ic4325a5529ba354c0ce176c4299a9c179f911ff2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332136
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-11-04 14:59:48 +00:00
Kevin Lubick
c4ab08710d [canvaskit] Add option for readPixels to use pre-malloc'd data
Bug: skia:10565
Change-Id: I777f887794cd0524ced4d65e86bd285a854386e5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331858
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2020-11-04 14:50:48 +00:00
Kevin Lubick
9fe83916e0 [canvaskit] Add fast pass for saveLayerPaint
Bug: skia:10586
Change-Id: I11c0de6181f73f4388e6b40d6869fce2265f34ea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331361
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Yegor Jbanov <yjbanov@google.com>
2020-11-04 14:49:34 +00:00
Kevin Lubick
e677f4ada0 [canvaskit] Properly expose getLineMetrics
This had previously been incompletely exposed. This does so
properly, by returning a JSArray of JSObjects with the metrics.

I am purposely not exposing fLineMetrics until that is explicitly
requested, as it looks complicated.

Bug: skia:10614
Change-Id: If3a2154e8ee39d8adcf416b4513b33a955c2482f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331359
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
2020-11-04 14:49:16 +00:00
John Stiles
a8889403fd Re-enable -Wdeprecated-copy-dtor.
This was mostly working already, because violating this warning would
break one of our builds, Build-Debian10-EMCC-wasm-Release-WasmGMTests.

Example: https://status.skia.org/logs/BmABdx9EQKaH89CcbwU2/605bf360-b5b1-4a72-9e9f-465444f7f36c

This did require a fix to Dawn (thanks to cwallez@):
https://dawn-review.googlesource.com/c/dawn/+/30701

Change-Id: I17723bda02f13895f9e19ea2e94dc48c2cdb1572
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330741
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-11-04 14:48:28 +00:00
Kevin Lubick
a8f4c91114 [canvaskit] Expose MakeRasterDirectSurface
This will let clients have faster access to the drawn data
and give them control about calling Canvas2D.putImageData.

Bug: skia:10565
Change-Id: Ia3da7867be3f671ab20fdb182ec758b77c0f63b8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331316
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2020-11-04 14:10:14 +00:00
skia-autoroll
97469f4abe Roll Chromium from c3b9f2527bea to 1f9589cf9ca4 (438 revisions)
c3b9f2527b..1f9589cf9c

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 bsalomon@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: bsalomon@google.com
Change-Id: I6dc2f2cb91d9f974f2bb556fa8fcc07d3c3c50c6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331866
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-11-04 04:49:52 +00:00
skia-autoroll
264019ff4b Roll Dawn from 3bf9f4a2e65e to db8766bb239b (2 revisions)
https://dawn.googlesource.com/dawn.git/+log/3bf9f4a2e65e..db8766bb239b

2020-11-04 shaobo.yan@intel.com Support internal pipelines for Dawn
2020-11-03 cwallez@chromium.org DEPS: Download clang-format from hashes in buildtools

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: I09b75f03e1a476af65efea34de95587a9feb1b59
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331865
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-11-04 04:47:12 +00:00
skia-autoroll
938932225c Roll SwiftShader from 959f41988a18 to 31e28d20f878 (5 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/959f41988a18..31e28d20f878

2020-11-04 capn@google.com Switch Chromium/Fuchsia to use the LLVM ORCv2 JIT
2020-11-03 nicolascapens@google.com Clarify the ICD/loader compatibility
2020-11-03 swiftshader.regress@gmail.com Regres: Update test lists @ b5bf8269
2020-11-03 capn@google.com Set LLVM_ENABLE_ABI_BREAKING_CHECKS for Debug builds only
2020-11-03 jari.komppa@siru.fi Add script to verify proper Memset template use

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 bsalomon@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: bsalomon@google.com
Change-Id: Ic2b6b83a04351dec1a5de4447b93c44785002551
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331863
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-11-04 04:39:52 +00:00
Chris Dalton
0e54309477 Merge GrStrokePatchBuilder into GrStrokeTessellateOp
There's really no reason for these classes to be separate at this
point. Also extracts a "GrStrokeOp" base class that has the
functionality that will be shared with indirect stroking.

Bug: skia:10419
Change-Id: I960d5e6d64f0814ccb4a3852bc627af2b8082a1f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331860
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-11-03 23:39:42 +00:00
Greg Daniel
fbc60b7e9e Fix viewer last image and zoomer.
Change-Id: If4f614510b3d2a5802e87350b8f09797d9c52c96
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332036
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-11-03 23:00:22 +00:00
John Stiles
6e7cfaff18 Fix bad FP codegen when sample() calls are inlined.
Previously, temp variables created by sample() calls were named after
the offset of the sample() call within the code. This was
straightforward but would fail if the sample() call were duplicated via
inlining of helper functions.

FP sample() temp variables are now named using a counter, starting from
zero and counting upwards.

Change-Id: I16f9a3426117677c0df13d15772320def99cc0d6
Bug: skia:10858
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331415
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-11-03 19:54:45 +00:00
John Stiles
351b8d8ce2 Poison unallocated block memory in GrBlockAllocator.
This will allow ASAN to detect use-after-free errors in pooled memory,
enabling our fuzzers to catch errors sooner.

Testing with oss-fuzz:26942 : http://screen/C5TEbu3CJvHzRqA

Change-Id: Ic47d6b043998e5069525490cd25b2390cad94360
Bug: skia:10885
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331482
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-11-03 19:31:35 +00:00
Herb Derby
52991f8c81 move subrun instances and support to .cpp
Change-Id: I12b5110b378a53f0ae416ede5ff864af116a3166
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331457
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-11-03 19:18:45 +00:00
John Stiles
569249be6c Improve support for function prototypes in SkSL.
Previously, when a prototype was parsed, this added a function
declaration to the symbol table, but the prototype itself was not
re-emitted during code generation. This meant that the final code might
not be valid, since the absence of prototypes meant that the code might
attempt to invoke a function before its declaration. Now, prototypes are
stored in the ProgramElement list and re-emitted during code generation
for GLSL/Metal/CPP. (SPIR-V doesn't name its functions at all.)

Change-Id: I76446c796000eb0b56f964d82457122182c28b87
Bug: skia:10872
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331136
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-11-03 19:09:25 +00:00
Brian Salomon
49721c8437 Revert changes to unbreak bots.
f01a9d9020
is the culprit


Revert "GrRefCntedCallback has Make function."

This reverts commit b2c42140ea.

Revert "Add SkImage::MakeFromYUVATexturesCopyToExternal"

This reverts commit f01a9d9020.

Bug: skia:10632
Change-Id: Ief076f168b63ff8ca15b607163a13d5f52a733d2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331798
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-11-03 18:52:45 +00:00
Herb Derby
bea4197f8b cull glyphs that have far out positions
If a glyph's position is > 32K or < -32K, then it is not
on the device. Don't bother adding it to the GrOp. This
reduces the glyph position from SkIPoint to
Vec<2, int16_t>.

But, if some of the glyphs are dropped, and the blob is
scrolled, then the glyphs may be in range. Add a flag
to track if glyphs were dropped, and force a redraw if
not exactly the same matrix is used to draw.

In addition,
* Rename VertexData to DevicePosition
* Add needed calls to GrGlyphRect

Change-Id: Ifdb8aa86d3da0b69d46c11fce5f33803781d880c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330622
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2020-11-03 18:46:47 +00:00
Brian Salomon
8b5d44b42a Revert "Reland "heif: Add AVIF type and AVIF sniffing""
This reverts commit 28eb592735.

Reason for revert: std::optional use is breaking bots, e.g.:
https://ci.chromium.org/raw/build/logs.chromium.org/skia/4fa8175011a1c411/+/annotations

Original change's description:
> Reland "heif: Add AVIF type and AVIF sniffing"
>
> This is a reland of 3ab5b73649
>
> Fix: Chromium does not use the heif decoder. So hide it behind
> an ifdef.
>
> Original change's description:
> > heif: Add AVIF type and AVIF sniffing
> >
> > AVIF is the image format based on the AV1 video codec. The
> > container for AVIF is very similar to that of HEIF. Add type
> > definitions for AVIF and sniffing code for detecting AVIF images.
> >
> > The underlying android platform's HEIF decoder implementation will
> > also support AVIF decoding.
> >
> > Bug: b/141654151
> > Change-Id: I7e31f4cedf0bffb8920ddf880a26601e48d0e833
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330059
> > Reviewed-by: Leon Scroggins <scroggo@google.com>
> > Reviewed-by: Derek Sollenberger <djsollen@google.com>
> > Reviewed-by: Chong Zhang <chz@google.com>
> > Commit-Queue: Leon Scroggins <scroggo@google.com>
>
> Bug: b/141654151
> Change-Id: Ie6840d6fc97789be619924fc60df8683cd58430f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331496
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Commit-Queue: Leon Scroggins <scroggo@google.com>

TBR=djsollen@google.com,scroggo@google.com,chz@google.com,vigneshv@google.com

Change-Id: I25df9f65b9d56d81be70a5fa650c3d841bd5a15e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: b/141654151
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331800
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-11-03 18:42:49 +00:00
Michael Ludwig
9597e2fbce Avoid redundant matrix inverse for DF text ops
Previously, if this was a DF-based text op and the shader had local coords, onPrepare() and setupDfProcessor() would both invert the same matrix.

Change-Id: I1cf989045791aabf9223728d485ce09ffb6412bb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330939
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-11-03 18:10:22 +00:00
John Stiles
7d3f089e58 Fix use-after-free error discovered by the fuzzer.
When eliminating a CFG node, we now flag its exit nodes; if our
optimization pass reaches one of those flagged nodes, we stop the
current optimization process in its tracks and initiate a rescan.

We do NOT recursively mark the exits of the exit nodes, so this fix is
reliant on the CFG being ordered in a non-chaotic fashion, but in
practice this seems to be sufficient for the CFGs we generate today.

Change-Id: I892805361c5f4297e02146f37a759dfda83f5488
Bug: oss-fuzz:26942
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331597
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-11-03 17:59:02 +00:00
Vignesh Venkatasubramanian
28eb592735 Reland "heif: Add AVIF type and AVIF sniffing"
This is a reland of 3ab5b73649

Fix: Chromium does not use the heif decoder. So hide it behind
an ifdef.

Original change's description:
> heif: Add AVIF type and AVIF sniffing
>
> AVIF is the image format based on the AV1 video codec. The
> container for AVIF is very similar to that of HEIF. Add type
> definitions for AVIF and sniffing code for detecting AVIF images.
>
> The underlying android platform's HEIF decoder implementation will
> also support AVIF decoding.
>
> Bug: b/141654151
> Change-Id: I7e31f4cedf0bffb8920ddf880a26601e48d0e833
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330059
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Reviewed-by: Chong Zhang <chz@google.com>
> Commit-Queue: Leon Scroggins <scroggo@google.com>

Bug: b/141654151
Change-Id: Ie6840d6fc97789be619924fc60df8683cd58430f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331496
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2020-11-03 17:50:42 +00:00
skia-autoroll
3a04e209b5 Roll Dawn from 71d2e1d23d49 to 3bf9f4a2e65e (4 revisions)
https://dawn.googlesource.com/dawn.git/+log/71d2e1d23d49..3bf9f4a2e65e

2020-11-03 dawn-autoroll@skia-public.iam.gserviceaccount.com Roll Tint from fc5a9cfaf70c to de6938789ccb (13 revisions)
2020-11-03 cwallez@chromium.org Add the -Wdeprecated-copy-dtor warning.
2020-11-03 cwallez@chromium.org Add the disallow_unsafe_apis toggle.
2020-11-03 cwallez@chromium.org ValidationTest: Make custom device creation go through a virtual method

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: I423afce6af135732540d7de002d716d3d8f5399d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331577
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-11-03 17:41:12 +00:00
Brian Osman
b047b5ddf4 Disable "any" function workaround in standalone/non-GPU caps
Change-Id: Ief57d9c102b3c7658738920cdf54ccd4d21c5c5e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331656
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-11-03 17:36:43 +00:00
John Stiles
e103f941fc Create test case for oss-fuzz:26942.
Change-Id: I19a9564ac4d52b709b8fdd757b99222372c626f4
Bug: oss-fuzz:26942
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331598
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-11-03 17:19:22 +00:00
Michael Ludwig
136d878002 Update GrAtlasTextOp::MaskType to enum class
Change-Id: I16a5938f5156fac2e93b8cd0b2a8e2ed45b46386
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330938
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-11-03 16:51:31 +00:00
Brian Salomon
b2c42140ea GrRefCntedCallback has Make function.
Each caller does not need to check for null function.

Also inherit from SkNVRefCnt.

Change-Id: I9a53c3c8e9dec1361db6cfb21b97d178173b23ac
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331490
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-11-03 16:49:12 +00:00
Michael Ludwig
290d6df49b Improve coverage AA for thin quads
This brings back the 2px wide picture frame approach described in these
slides: go/thin-line-aa. This has been in place when the per-edge-aa
only needed to support rectangles but was scrapped when the code path
was updated to support arbitrary quadrilaterals.

I opted to have the GrQuadPerEdgeAA logic check for degeneracy and
update what it requests for the outset. This scale factor out to a 2px
wide shape makes sense in the context of anti-aliasing, but not so for
the generalized inset/outset logic defined in GrQuadUtils. It would have
been more efficient to implement it there, but would have locked it in
to being just AA inset/outset.

I also updated SkGpuDevice's drawStrokedLine to construct the quad of
the line directly, and to always turn a line path into a rect, instead
of restricting it based on matrix or stroked width. With this new change
the quality of the fill rect is much higher under rotations and
perspective compared to the hairline.

See rect case: https://drive.google.com/file/d/1xwgG5heADcdXYShsDodgbuv2tbHfuBNt/view?usp=sharing
Hairline case: https://drive.google.com/file/d/1duNLxiYLLJhsJ94Uc01rSxjB4ar6_Ud9/view?usp=sharing

Bug: chromium:820987
Change-Id: Ibd58b89a467ad5a61c5479d11259024259f1bb47
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/329418
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-11-03 16:08:11 +00:00
Greg Daniel
5943feea46 Add support for wrapped GrAttachments.
Bug: skia:10828
Change-Id: Ifab9c2b179fa981a94d03ff96718c3b31f745fee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331338
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-11-03 15:53:11 +00:00
Robert Phillips
7ffdb695dc Minor cleanup of GrTriangulatingPathRenderer
Change-Id: Iee207b861aa1a5d4036e99305b9460fd31d5129d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331537
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-11-03 15:44:11 +00:00
Tyler Denniston
dada960d79 [svg] Add feTurbulence filter (incomplete)
This was the simplest one to start with. I need to add support for the
"filter effect subregion" in order to handle tile stitching property,
so this isn't quite complete. But I believe this is enough for the
basic filters-turb-01-f test to pass, which gives us a baseline for
further filter work.

Summary of changes:
- Added attribute type and parsing for SVG integer datatype
- Added new node class for feTurbulence
- Added several new properties and parsing for feTurbulence

Bug: skia:10841
Change-Id: I8c877a5e1a837bfd527782253062eeb58febdde6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330621
Commit-Queue: Tyler Denniston <tdenniston@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-11-03 15:41:41 +00:00