Commit Graph

48992 Commits

Author SHA1 Message Date
Chris Bracken
72f403c343 Use Mac font manager for both iOS and macOS
If skia_use_fonthost_mac is set, use SkFontMgr_mac_ct_factory.cpp on
both macOS and iOS. Previously, this was only used on macOS, causing iOS
Flutter builds to default to SkFontMgr_empty_factory.cpp on that
platform.

Patch that introduced the Flutter iOS issue:
https://skia-review.googlesource.com/c/skia/+/295437

Change-Id: If2f1e7db47a55245de6c2658ad564e79134d3e7d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297194
Commit-Queue: Chris Bracken <cbracken@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2020-06-17 21:50:10 +00:00
Derek Sollenberger
83195191bd Revert "Convert Skottie build instructions to build an Android Library (AAR) instead of app (APK)"
This reverts commit dff4d584ed.

Reason for revert: breaking the google3 roll

Change-Id: I0e26c77e9bad0f48bc726d3b63a97d5aa7fa51ac
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297190
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2020-06-17 20:35:21 +00:00
Derek Sollenberger
590e8db5d8 Revert "Replace analytic clip stack with chained fragment processors."
This reverts commit 907f34bfc1.

Reason for revert: speculating that this is breaking the chromium roll

Change-Id: I7283f9e9d52066be4c13aff72a948f9332977e59
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297186
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2020-06-17 20:07:16 +00:00
Brian Salomon
77628ce0e4 GrCircleBlurFragmentProcessor uses GrTextureEffect for profile texture
Bug: skia:10139

Change-Id: If539b6ad3a55c157fa5761abeaf13b318047839e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296731
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-06-17 19:33:09 +00:00
Ben Wagner
588b32c04e Update debugger to new fontmgr selection.
With commit 75626e4 "Regularize selection of fontmgr." the skottiekit
and convaskit compile.sh files were updated, but the wasm-skp-debugger
one was overlooked. This will lead to selection of the empty fontmgr
which cannot load fonts.

Change-Id: I8c3090866f27d42a0f1fcf74e3209298d7cb0af5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296722
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-06-17 19:31:28 +00:00
John Stiles
907f34bfc1 Replace analytic clip stack with chained fragment processors.
We no longer need to maintain a vector of analytic FPs and run them in
series. (CCPR and fShader do not support chaining in this CL, so we do
need to assemble a vector of FPs at the last instant.)

Change-Id: I1f7a64cf617d577e05e1fe41c740361f702a76b0
Bug: skia:10217
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296861
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-06-17 18:53:18 +00:00
John Stiles
851b90e102 Update GrRRectEffect to take an input FP and return a MakeResult.
Change-Id: If5abcd2347871c62e03c8708705ec1041572465a
Bug: skia:10217
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296838
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-06-17 18:24:58 +00:00
Elliot Evans
8605d84f6d Add a future_apis folder to canvaskit. future_apis contains notes on
proposed and upcoming APIs and how they may be able to be used with
CanvasKit.

Change-Id: I085e65e7e3c58ef2cbe2ce60ddd813b2c531c890
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296752
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-06-17 18:17:25 +00:00
Brian Salomon
e338c297d0 Make GrGLPerlinNoise::emitCode easier to read.
Convert many formatted strings to plain old strings.

Favor readability of generator over generated code since
we typically pretty print the generated code if we need
to read it.

Change-Id: I0185cd1133f09d07e8ebd8c959e0397818727611
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297057
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-06-17 18:11:18 +00:00
Jorge Betancourt
dff4d584ed Convert Skottie build instructions to build an Android Library (AAR) instead of app (APK)
Change-Id: Ib12364792523ac896c74ce2cd563173dd6081e78
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296417
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2020-06-17 18:09:28 +00:00
John Stiles
de975e3697 Support MakeResult in GrOvalEffect.
Because GrOvalEffect is used in GrRRectEffect, this will be useful in
followup CLs that port over GrRRectEffect to MakeResult.

Change-Id: Id1d9344af7666d79c62766adfeb920e4ac124a4e
Bug: skia:10217
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296596
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-06-17 17:50:54 +00:00
John Stiles
3b2c06c46b Remove HairlineAA from the clip-edge types.
GrQuadEffect and GrConicEffect were the only FPs that supported the
HairlineAA clip-edge type. These FPs have been updated to implicitly
always use HairlineAA, and other FPs no longer need to consider the
HairlineAA case.

This CL also updates the bezier-effects GM images to remove the non-
hairline test columns.

Change-Id: Ice942106344cf48480e972da4aab1c6055f9911e
Bug: skia:10393
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297019
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-06-17 17:43:35 +00:00
Derek Sollenberger
abae40299c Reland "Update zlib DEPS"
This is a reland of 6fb3687413

Original change's description:
> Update zlib DEPS
> 
> Pull latest zlib into Skia and updated its BUILD files to build some
> SIMD variants.
> 
> Bug: skia:10391
> Change-Id: Ic1a660c8f5f7e5f94440787779fd74b7192ab6d5
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296720
> Auto-Submit: Derek Sollenberger <djsollen@google.com>
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Derek Sollenberger <djsollen@google.com>

Bug: skia:10391
Change-Id: I4d38a526f2785e70ef9fa134c681fd3dc4d57c44
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297020
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2020-06-17 17:27:15 +00:00
Herb Derby
ccbd3eeb58 use joinPossibleEmptyRect for bounding box
When the fuzzer is used, some of the positions are so far out in the
float space, that all values become the same making empty rects.

Using joinNonEmptyArg really had no advantages.

Bug: chromium:1095625

Change-Id: I46a61e422ff7053aca2f34494a2f5f0ec7e8fc74
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297026
Commit-Queue: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2020-06-17 16:47:54 +00:00
Greg Daniel
8346834d7c Fix D3D InstanceDataStepRate.
For instanced data this value controls how many instances to draw before
going to the next set of instance data in the buffer. For all of Skia's
uses this is 1.

Change-Id: I280ef3fbe431f5d9233657a5e5783c03b3b1cf6c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297025
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-17 16:42:54 +00:00
John Stiles
952dd05220 Revert "roll GN"
This reverts commit 81ec426d6e.

Reason for revert: breaks Xcode

Change-Id: Ib4dec91ae19e6b0ce242fa543cf7bcdf306c0220
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297022
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-06-17 16:00:54 +00:00
Brian Osman
15207b8567 Disable program binary caching on AMD + ANGLE D3D9
This should fix the flaky GM results that appeared when caching was
fixed/enabled recently.

Bug: skia:10395
Change-Id: Idd35f6a57e94504d56186be3601b52728ada97e7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297018
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-06-17 15:49:54 +00:00
Greg Daniel
1f14ca04b9 Implement set scissor on d3d render pass.
Change-Id: I36c748f7e91c0b9695623e60bd87b98605800159
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297017
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-17 15:13:34 +00:00
Julia Lavrova
c4d49056b4 Cleaning codepoints/grapheme mess; it also helps with ICU API
Renamed all codepoints into utf16Index

Change-Id: Ie915395a56ac825637f6dbb25824cd1635a5b0a6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296438
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2020-06-17 14:51:24 +00:00
Florin Malita
4190f27b41 Fix SkParse::FindNamedColor OOB
Plus some minor cleanup and asserts.

Bug: oss-fuzz:23395

Change-Id: I667bee2d7f21864defe2fd97df9eb4e99d69d9ca
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296451
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2020-06-17 14:23:14 +00:00
Derek Sollenberger
1443609db4 Revert "Update zlib DEPS"
This reverts commit 6fb3687413.

Reason for revert: breaking a bunch of linux builds

Change-Id: I71dd154785fb00dd20bc157d5d5daf1ee2101fc2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296996
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2020-06-17 13:20:37 +00:00
Derek Sollenberger
6fb3687413 Update zlib DEPS
Pull latest zlib into Skia and updated its BUILD files to build some
SIMD variants.

Bug: skia:10391
Change-Id: Ic1a660c8f5f7e5f94440787779fd74b7192ab6d5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296720
Auto-Submit: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2020-06-17 13:11:53 +00:00
John Stiles
2518f546e3 Enable implicit-fallthrough warnings on Clang.
Change-Id: I5c1e6d8fd52ecfe628a78569b4665a64e1499fa5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296938
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-06-17 13:02:13 +00:00
Brian Salomon
f5cd604cb9 GrMagnifierEffect uses child for src
Bug: skia:10139

Change-Id: I07b95233c7a7892be8b70e7b640c71ce438545f1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296803
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-06-17 12:45:33 +00:00
skia-recreate-skps
4c47d0ddea Update Go Deps
Change-Id: I6bfee24b0f65aef875511c6e2645d12a46c7d3c0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296972
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2020-06-17 05:41:53 +00:00
skia-autoroll
4d51b1e4c5 Roll Chromium from c5b7f210ebff to 5af39e89bd12 (524 revisions)
c5b7f210eb..5af39e89bd

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: Ie2e4690f67264ef64dac2b74d415c5e8c168c1cc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296963
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:38:58 +00:00
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