Commit Graph

48966 Commits

Author SHA1 Message Date
skia-autoroll
1f4ed47eb2 Roll SwiftShader from 8cbee4107cf1 to 763957e6b4fc (8 revisions)
https://swiftshader.googlesource.com/SwiftShader.git/+log/8cbee4107cf1..763957e6b4fc

2020-06-17 capn@google.com Ignore rasterization state pointers when rasterization is disabled
2020-06-17 capn@google.com Zero-initialize the context state and data
2020-06-16 sugoi@google.com Cleanup: using the proper Image subregion structure
2020-06-16 bclayton@google.com Update Marl to d29553a37
2020-06-16 bclayton@google.com Update Marl to 5c6c15322
2020-06-16 bclayton@google.com Merge changes I3e59c425,I46075a36,I73cd3e57,Ic09c196b
2020-06-16 bclayton@google.com SpirvShaderDebugger: Show vector elements as xyzw
2020-06-16 bclayton@google.com SpirvShaderDebugger: Add a virtual destructor

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 djsollen@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: djsollen@google.com
Change-Id: I7d9af5bb2e3df5a38e5c983c13376aaa736dddd7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296962
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-06-17 04:37:23 +00:00
skia-autoroll
3244745c3d Roll dawn from 984493d0ac07 to 3f4f35661151 (8 revisions)
https://dawn.googlesource.com/dawn.git/+log/984493d0ac07..3f4f35661151

2020-06-16 natlee@microsoft.com Fix D3D12 Device Initialize calls NextSerial
2020-06-16 bryan.bernhart@intel.com D3D12: Workaround incorrect debug layer error handling
2020-06-16 rharrison@chromium.org Use Tint public header
2020-06-16 natlee@microsoft.com Fix AssertAndIgnoreDeviceLossError to handle errors injected by fuzzer
2020-06-16 brandon1.jones@intel.com Fix fuzzer hang when waiting for fence signal after device loss
2020-06-16 jiawei.shao@intel.com Clean up CopyTests
2020-06-16 cwallez@chromium.org Reland: Vulkan: Enforce fixed subgroup size for compute shaders.
2020-06-16 cwallez@chromium.org Reland: Vulkan: Report and enable subgroup size control device extension.

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: I3434fb3a37210a8ab3c2b1e1b84a4960f9d11043
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296964
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-06-17 04:33:53 +00:00
Chris Dalton
de980231f6 Add a test for wide butt caps
This tests the case where the stroke has butt caps and its width
significantly larger than the path itself. There seems to be some
uncertainty over what should actually be drawn in some of these cases,
as evidenced by the variable results from different path renderers
here.

Change-Id: I5b62ec446bfbba73d09ddb4eac710e338bedfc6e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296114
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-06-16 23:00:33 +00:00
John Stiles
f08a82b52d Return tuple from GrConvexPolyEffect::Make denoting success or failure.
Change-Id: I1c9cd865c3fd37b5d4c911790713d9ca2283aeee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296724
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-06-16 21:08:33 +00:00
Brian Osman
c85f1fa20f Support viewing/changing backend shaders in Viewer
Previously, all backends allowed the SkSL to be edited, and GL allowed
GLSL to be edited. Now any backend's source can be seen, and they can
all be edited (other than SPIR-V). Tested with HLSL and SPIRV. I don't
have a Mac available, but MSL should work, too.

Change-Id: Ia2a11bb5922dd49a5f25840e48384e0246a28b69
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296856
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-06-16 21:03:53 +00:00
Florin Malita
edd208d91f [skottie] Simplify SkColor conversion
Use the SkColor4f helper.

TBR=
Change-Id: Iefbbfb1c20a298c8a221f279f9c5b086613c91eb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296858
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-06-16 20:52:33 +00:00
Brian Osman
5ca9d1a341 Fix caching of HLSL in D3D backend
We were always tagging the stored shaders as SkSL, so they (naturally)
didn't compile when we loaded them.

Change-Id: I96062808751b6233c9e90b29150f66270d0dd198
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296836
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-06-16 20:09:03 +00:00
Adlai Holler
33d569ee18 Elevate the target list of Ganesh tasks to base class
A follow up CL will use the availability of this information - the full
list of targets of a GrRenderTask – to enable faster storage of the
lastRenderTask association for a given surface proxy in a given drawing
manager.

Bug: skia:10320
Change-Id: I3eb3276b483a7f09481774896a024172b73a4c84
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296729
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2020-06-16 19:01:53 +00:00
Greg Daniel
ec3508aaef Add uniform rtHeight in d3d when needed.
Change-Id: Id6df54efa6d71d35b682e6910d08371fc8065c88
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296799
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-06-16 18:57:34 +00:00
Florin Malita
1d585c219b [skottie] SkResources::loadTypeface() callback
Some clients already have SkTypeface objects, and forcing them to pass
these as SkData is awkward - especially since Skottie immediately turns
them into SkTypeface again.

Replace the existing loadFont() callback with loadTypeface().

(for compatibility, we try both for now, but the plan is to phase-out
loadFont)

Change-Id: Ib4c2446a96cb6a5f95581c405d0a1b4ecff7ddb2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296718
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2020-06-16 18:53:04 +00:00
Brian Salomon
1b0b0046cb GrMatrixConvolutionEffect uses child for sampled kernel
Bug: skia:10139

Change-Id: Ic1380cf47c9293a54bf104ccbb3ca3222e704276
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296127
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
2020-06-16 18:41:23 +00:00
Robert Phillips
889d613875 Add GM::gpuSetup step
In order to emulate OOP-R's behavior, GM needs to pass GPU-backed resources to a DDL recorder.

This change allows GMs to create GPU resources first (in onGpuSetup w/ a direct context) and then use them in onDraw (with only a GrRecordingContext).


Change-Id: Ifa3002af73eb9926f653fb4c4bf4542c0749d658
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/294336
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-06-16 18:31:55 +00:00
Brian Osman
b71b6ae106 Hook up persistent shader cache for D3D
Currently supports SkSL & HLSL. We should see if we can safely serialize
the shader blobs returned by D3DCompile.

We can't (yet) view the HLSL in Viewer - the shader viewer/editor needs
an overhaul to support backend-specific source formats (MSL, HLSL,
disassembled SPIRV). Going to look into that in a separate CL.

Change-Id: Ife1fd1d3d724674b24793df2d86c52a9b8f7de23
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296734
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-06-16 18:12:03 +00:00
Greg Daniel
5f196bb0e1 Fixed instanced drawing for d3d.
Change-Id: I42db2a887316e9e6487513c56afc730f98111a6d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296735
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-06-16 17:44:00 +00:00
Zepeng Hu
f1eb43e880 replace max_len with if statements
Change-Id: I60d60e9b9ea0b7b6544a36bef7f4e263bb9de532
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296416
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Zepeng Hu <zepenghu@google.com>
2020-06-16 17:26:30 +00:00
Brian Salomon
4569f66309 Remove coverage-as-alpha flag from GrAlphaThresholdFP
Don't sort thresholds and allow full 0..1 range

Change-Id: I228be036bb259bea53ac9885e758c9e46ced1d62
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296717
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-06-16 15:24:50 +00:00
Greg Daniel
ca72cad601 Blacklist failing d3d tests.
Bug: skia:9935
Change-Id: I018bfc1b100a3d5a1796aadfb2cc130bf5ed6611
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296719
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-06-16 14:51:10 +00:00
Brian Salomon
5cd393b3b7 GrCCClipProcessor uses GrTextureEffect
Bug: skia:10139

Change-Id: Ife22634a1c173845fe832df27496206a9ca9e1de
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296119
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-06-16 14:42:20 +00:00
Greg Daniel
90cf5d458f Some more fixes to d3d stencils.
Change-Id: I8e6309b5ae794b0291ecc45267f67328a0f52829
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296716
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-06-16 14:39:00 +00:00
Robert Phillips
5f0cda4ad4 Refine VkYcbcrSamplerHelper to only hold backend memory for YCbCr textures
This arrangement allows the backend texture to outlive the YCbCr SkImage.

Change-Id: I34939d05bf1091c8efcacb687dc1900729d4cbe5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296478
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-06-16 14:05:30 +00:00
Mike Klein
81ec426d6e roll GN
up to https://gn-review.googlesource.com/c/gn/+/8920

Change-Id: Ibf69abea267f092fe1bcfed3b7c02a8935223e36
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296705
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-06-16 13:34:50 +00:00
John Stiles
2659f79a28 Fix Housekeeper-PerCommit-CheckGeneratedFiles status error.
Regression occurred at
https://skia-review.googlesource.com/c/skia/+/296477

Change-Id: I79e08f4c449a427152966876aad9cef8363e907b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296597
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-06-16 12:51:10 +00:00
Robert Phillips
762cb4ea46 Add option to DDL test harness to better match OOP-R behavior
Change-Id: I043613c127dbfa1ebb7dcf5eab7b996afb676b61
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296449
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-06-16 12:30:41 +00:00
skia-recreate-skps
f4ec452b7a Update Go Deps
Change-Id: I115d8358241d2a7bfe89661d5390355fd9ffa1bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296588
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2020-06-16 05:46:59 +00:00
skia-autoroll
16cb83b451 Roll SwiftShader from a6940c8e6eb0 to 8cbee4107cf1 (1 revision)
https://swiftshader.googlesource.com/SwiftShader.git/+log/a6940c8e6eb0..8cbee4107cf1

2020-06-15 amaiorano@google.com Make rr::Print output to debugger and be stubbed

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 djsollen@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: djsollen@google.com
Change-Id: I4f0e31bf36bf22f793ef88ffe12b044770e3c28b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296636
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-06-16 05:14:19 +00:00
skia-autoroll
92d2871493 Roll Chromium from d877aabea65f to c5b7f210ebff (465 revisions)
d877aabea6..c5b7f210eb

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 djsollen@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: djsollen@google.com
Change-Id: Ia3691c8f5603ac7a186950e23c7a78c3318cf9f8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296585
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-06-16 04:40:19 +00:00
skia-autoroll
66445f67f0 Roll dawn from 6b3a974b42a3 to 984493d0ac07 (9 revisions)
https://dawn.googlesource.com/dawn.git/+log/6b3a974b42a3..984493d0ac07

2020-06-16 cwallez@chromium.org Deprecate TextureCopyView::arrayLayer -> origin.z
2020-06-15 enga@chromium.org Handle OOM buffer allocations better
2020-06-15 rharrison@chromium.org Rolling 3 dependencies
2020-06-15 idanr@google.com Rolling 5 dependencies
2020-06-15 yunchao.he@intel.com D3D12: use one barrier to transit states for all subresources
2020-06-15 yunchao.he@intel.com Optimize subresource tracking - use texture view
2020-06-15 yunchao.he@intel.com Refactor subresource related variables to a struct - backend
2020-06-15 cwallez@chromium.org Texture: Change to mArrayLayerCount to mSize.depth
2020-06-15 cwallez@chromium.org Deprecate TextureDescriptor::arrayLayerCount -> size.depth

Also rolling transitive DEPS:
  https://chromium.googlesource.com/external/github.com/KhronosGroup/glslang from 08328fea5ab9 to 00965b9fa9a8
  https://chromium.googlesource.com/external/github.com/google/shaderc from d8eca133b4b1 to c2ac70797a38

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: I421a0971af7b09226bfff0eeb01d39582c8d4f3c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296586
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-06-16 04:32:19 +00:00
Greg Daniel
47111d18f4 Fix d3d clear op rect.
Make sure we take into account the origin when setting this rect.

Change-Id: I9cd35a25cb1489984597946bbeb7563a347c7c86
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296518
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-06-15 21:58:04 +00:00
Greg Daniel
83cd46bef7 Add support for stencil in d3d.
We already have a stencil buffer class, so this adds the code to bind the
stencil and clear it.

Change-Id: I9af90d999881954cfb26ceb6a31a5ab2cf9bbe3b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296517
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-06-15 21:28:35 +00:00
John Stiles
ec9269be54 Update GrConvexPolyEffect to support an input FP.
Change-Id: I813a4e4a5b4b0dc4f8ea59056d125386e6049ab4
Bug: skia:10217
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296516
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-06-15 21:02:25 +00:00
Brian Salomon
6b2caf7dfc GrAlphaThresholdFragmentProcessor uses child processor for mask.
Bug: skia:10139

Change-Id: I526f8ca77de0ed6ab1fe16b22201043ebf5c3716
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296477
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-06-15 20:41:35 +00:00
John Stiles
c0d5d9c6f6 Update EllipticalRRectEffect to support an input FP.
We are updating FPs to receive their input via a child FP where
possible, instead of relying on the input color.

Additionally, made minor cleanups in CircularRRectEffect for parity
with EllipticalRRectEffect, and took advantage of the new API
cloneAndRegisterAllChildProcessors to reduce boilerplate.

Change-Id: I3b7d22cb2a9da4471bdfda763dac93fe7616d927
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296129
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-06-15 20:34:24 +00:00
John Stiles
8c71f3e7d7 Improve error reporting in ProcessorCloneTest.
Previously, when REPORTER_ASSERT reported a failure, there was no
additional information describing the FP that could not be cloned in the
error log. Now, we print out a very simple tree of the FP and its
children.

Change-Id: I141cfb17ca431864a6f555d56f0335293f259c4e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296452
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-06-15 19:53:54 +00:00
Elliot Evans
2879619a29 Added CanvasKit.MakeImageFromCanvasImageSource which is useful as an alternative to
CanvasKit.MakeImageFromEncoded, when used with Browser APIs for loading/decoding images.

 - `CanvasKit.MakeImageFromCanvasImageSource` takes either an HTMLImageElement,
   SVGImageElement, HTMLVideoElement, HTMLCanvasElement, ImageBitmap, or OffscreenCanvas and returns
   an SkImage. This function is an alternative to `CanvasKit.MakeImageFromEncoded` for creating
   SkImages when loading and decoding images. In the future, codesize of CanvasKit may be able to be
   reduced by removing image codecs in wasm, if browser APIs for decoding images are used along with
   `CanvasKit.MakeImageFromCanvasImageSource` instead of `CanvasKit.MakeImageFromEncoded`.
-  Three usage examples of `CanvasKit.MakeImageFromCanvasImageSource` in core.spec.ts. These 
   examples use browser APIs to decode images including 2d canvas, bitmaprenderer canvas, 
   HTMLImageElement and Blob.
-  Added support for asynchronous callbacks in perfs and tests.

Here are notes on the image decoding approaches we tested and perfed in the process of finding ways 
to use Browser APIs to decode images:

1. pipeline:
  ArrayBuffer → ImageData → ctx.putImageData →
  context.getImageData → Uint8Array → CanvasKit.MakeImage
 Problem: ImageData constructor expects decoded bytes already.

2. interface.js - CanvasKit.ExperimentalCanvas2DMakeImageFromEncoded (async function)
pipeline:
  ArrayBuffer → Blob -> HTMLImageElement ->
  draw on Canvas2d -> context.getImageData → Uint8Array →
  CanvasKit.MakeImage
 Works
⏱ Performance: 3rd place (in my testing locally)

3. interface.js - CanvasKit.ExperimentalCanvas2DMakeImageFromEncoded2 (async function)
  ArrayBuffer → Blob → ImageBitmap → draw on Canvas2d →
  context.getImageData → Uint8Array → CanvasKit.MakeImage
 Works
⏱ Performance: 2nd place (in my testing locally)

4. interface.js - CanvasKit.ExperimentalCanvas2DMakeImageFromEncoded3 (async function)
  ArrayBuffer → Blob → ImageBitmap →
  draw on canvas 1 using bitmaprenderer context →
  draw canvas 1 on canvas 2 using drawImage → context2d.getImageData →
  Uint8Array → CanvasKit.MakeImage
 Works
⏱ Performance: 1st place (in my testing locally) - quite surprising, this in some ways seems to be a more roundabout way of CanvasKit.ExperimentalCanvas2DMakeImageFromEncoded2, but it seems bitmaprenderer context is fairly fast.

Bug: skia:10360
Change-Id: I6fe94b8196dfd1ad0d8929f04bb1697da537ca18
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295390
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-06-15 19:35:09 +00:00
Florin Malita
2d9e0357fa Fix infinite loop in SkParsePath::FromSVGString
A close-path verb (Z) does not allow/consume any numerical tokens.

Bug: oss-fuzz:23398
Change-Id: I46694957873b615875fb9ff7ed01b9d77a49babc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296476
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2020-06-15 19:31:45 +00:00
Brian Osman
5ee90ff982 Moved SampleMatrix computation out of SectionAndParameterHelper
This will let us share this code with the pipeline stage code generator,
which doesn't use the helper.

Change-Id: I8df3a71d448697d98b1fcbabda524e48e42db591
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295561
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-06-15 19:18:14 +00:00
John Stiles
e3a39f7053 Update ConstColor FP to support an input FP.
In the "ignore input" mode, the input FP contributes nothing and is
never sampled. In the "modulate input" cases, the input FP is sampled
as one would expect.

Change-Id: I96717d63d8e3d7ef6aa4eaaf88154c6e5ce47e55
Bug: skia:10217
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296299
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-06-15 18:45:04 +00:00
Greg Daniel
a4a132c2be Fix tracking of d3d cpu descriptor heaps.
The way you access individual descriptors in a heap for d3d is that you
get a handle to the start of the heap, get the stride between
descriptors, and then you can do start + index * stride. Previously we
were assuming that the ptr handles for different heaps would not overlap.
Thus when recycling an individual descriptor we were using its handle ptr
to decide which heap it belonged to.

However, the spec doesn't require that these handles act like actual
pointer to memory. On a least some machines it was noticed that the start
handle for different heaps just incremented by 1 for each new heap even
though each used 32 as their stride. Long story short it is not valid
to do any sort of comparison of handles between different heaps Thus we
have to explicitly track which handles come from which heaps so we know
of to correctly recycle them.

This fixes the main/most common crash we were seeing on d3d viewer.

Change-Id: I5107104b245dc13a3b6b21e9e04b88ed8f55c80b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296448
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-06-15 17:37:04 +00:00
Herb Derby
a08bde606a GrTextContext::Options -> GrSDFTOptions
Rename GrTextContext::Options to GrSDFTOptions. Remove GrTextContext.

TBR=reed@google.com

Change-Id: Ic89966cfe630cc6ee757977a6d63ae1da9e39ef0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296176
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-06-15 17:14:04 +00:00
John Stiles
92219b464a Fix pointer ownership issue with SkSL static switches.
When collapsing static switches, we were not handling the symbol table
in SkSL::Block correctly, which led to assertion failures in some cases.

This CL is based on the fixes in http://review.skia.org/296178
but removes the need to track pointers-to-unique-pointers.
We do this by splitting the work into two parts:
1 - determine range of statements to move
2 - actually move statements

Because the statements are all consecutive, keeping track of this range
is not actually that difficult and we don't need to do any checks twice.

Change-Id: I71ad745ef1e4b4f5f6b753762e65fa49b2399adc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296440
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-06-15 17:09:54 +00:00
Brian Salomon
602b402485 Disable MorphologyFilterRadiusWithMirrorCTM_Gpu on AndroidOne
Bug: skia:10383

Change-Id: I09f5029a11ed27e11e4de9fbb9ce58052b3d7fc6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296436
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-06-15 16:21:34 +00:00
John Stiles
9ec6b05a43 Add cloneAndRegisterAllChildProcessors.
This method should make it simpler for hand-written fragment processors
that have child FPs to implement clone() properly.

Change-Id: I1927d98857533406e732c8c6a8b228cb8cdb59b6
Bug: skia:10217
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296439
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-06-15 16:06:55 +00:00
Dominic Mazzoni
127c607818 Add separate PDF tag attribute interfaces for names and strings
In PDF files, "names" and "strings" are not the same thing, but I was
conflating them. Separate out the interfaces for adding attributes to
PDF struct tree elements so there's a way to add either a name or a string,
and similarly for arrays of names or arrays of strings.

Fix the table test to correctly use a name for the "Scope" attribute
and an array of strings for the "Headers" attribute.

Bug: chromium:607777
Change-Id: Ib30bded2bbcf96e31ba6925fb062615558dea0db
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296338
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Auto-Submit: Dominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2020-06-15 15:46:29 +00:00
John Stiles
3779f448ca Add helper method to clone and register a child FP.
This will remove common boilerplate from our gen-code, and gives us a
place to put common child-cloning boilerplate.

Change-Id: I6101655af89d4c5844ec908b81ce4f6e5d59f834
Bug: skia:10217
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296177
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-06-15 15:43:05 +00:00
Derek Sollenberger
b48895dca2 Revert "Allow building with Wuffs v0.3, not just v0.2"
This reverts commit c34344989a.

Reason for revert: breaking the windows msvc compile bot as well as the flutter canary

Original change's description:
> Allow building with Wuffs v0.3, not just v0.2
> 
> This is step 1 of a multi-step, multi-repository transition:
> 
> 1. Let Skia work with either Wuffs v0.3 or v0.2. This repository
>    defaults to v0.3 but other repositories' defaults remain at v0.2.
> 2. Update users' Skia version (automatic if they update regularly).
> 3. Update users' Wuffs version and opt them in to Skia-uses-Wuffs-v0.3.
> 4. Flip Skia choosing Wuffs version 0.3 from opt-in to opt-out.
> 5. Remove the option for Skia to work wih Wuffs v0.2.
> 
> Change-Id: Ie5cf238057060f2a40cc7c0070d6e2a076943e2b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295976
> Commit-Queue: Leon Scroggins <scroggo@google.com>
> Reviewed-by: Leon Scroggins <scroggo@google.com>

TBR=scroggo@google.com,nigeltao@google.com

Change-Id: I2c8a44962eb9b136b199dba5f52a860d756a0aa1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296441
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2020-06-15 15:41:26 +00:00
Nigel Tao
c34344989a Allow building with Wuffs v0.3, not just v0.2
This is step 1 of a multi-step, multi-repository transition:

1. Let Skia work with either Wuffs v0.3 or v0.2. This repository
   defaults to v0.3 but other repositories' defaults remain at v0.2.
2. Update users' Skia version (automatic if they update regularly).
3. Update users' Wuffs version and opt them in to Skia-uses-Wuffs-v0.3.
4. Flip Skia choosing Wuffs version 0.3 from opt-in to opt-out.
5. Remove the option for Skia to work wih Wuffs v0.2.

Change-Id: Ie5cf238057060f2a40cc7c0070d6e2a076943e2b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295976
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2020-06-15 14:34:34 +00:00
Mike Reed
82d619699d remove (unused) clipmask from savelayer
Change-Id: I44f64a8c98c019a8f4878b0b6f6d82489aa8252c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296179
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-06-15 14:26:44 +00:00
skia-autoroll
08ac84a66a Roll Chromium from 0f6d038f871a to d877aabea65f (508 revisions)
0f6d038f87..d877aabea6

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 djsollen@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: djsollen@google.com
Change-Id: Ie6536d78032bdb011cd9ea087e6768be58b23216
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296324
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-06-15 04:54:34 +00:00
skia-autoroll
ff7ea5c024 Roll dawn from 5fafb49c7b4d to 6b3a974b42a3 (8 revisions)
https://dawn.googlesource.com/dawn.git/+log/5fafb49c7b4d..6b3a974b42a3

2020-06-13 jiawei.shao@intel.com OpenGL: Enable nonzero_clear_resources_on_creation_for_testing on buffer
2020-06-13 jiawei.shao@intel.com D3D12: Enable nonzero_clear_resources_on_creation_for_testing on buffer
2020-06-12 brandon1.jones@intel.com Make D3D12 Fuzzer Only Build On Windows
2020-06-12 yunchao.he@intel.com Vulkan: use one barrier if we can for non-pass operations
2020-06-12 cwallez@chromium.org Don't store unnessary SubresourceRange members in TextureBase
2020-06-12 cwallez@chromium.org Vulkan: Properly handle Device extension dependencies
2020-06-12 brandon1.jones@intel.com Track ShaderVisibleDescriptorHeap Upon Allocation
2020-06-12 natlee@microsoft.com Fix ResourceMemoryAllocation null dereference

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: Ida4f292988c98f54942ebb3e6a8abbf5b3b188f8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296323
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-06-15 04:34:24 +00:00
skia-recreate-skps
ca72a47e23 Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=rmistry@google.com
NO_MERGE_BUILDS

Change-Id: Iee883f9ca87e231c40f3a33e06cfb2a93911b4b6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296317
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2020-06-14 06:31:37 +00:00