Commit Graph

49166 Commits

Author SHA1 Message Date
Brian Salomon
b9b137304e Fix nearest neighbor sampling of YUV[A] images
Change-Id: If07ded029ddfe4c1d3cc1a6f206f9aca75fbb8bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/295568
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2020-06-25 16:13:43 +00:00
Brian Osman
061a5cf82a Move SkSLSampleMatrix to include/private
Switch it to use std::string (not SkSL::String). Along these lines,
remove SkSL::String's operator SkString, and instead add an explicit
SkString constructor from std::string.

Other changes aren't strictly necessary, but I wanted to clean up some
of the other SkSL vs. Skia code barriers. VS (since 2015) has had
vsnprintf that conforms to the C99 standard, the only difference with
_vsnprintf is a different (nonstandard) return value for overflowing
calls. Remove the special-case (the only use of SKSL_BUILD_FOR_WIN).

Change-Id: I8826af10c8e78a8d935c601d00b8ae9ba0640041
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298816
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-06-25 15:53:33 +00:00
Herb Derby
d0fa3ee55c add mutex to GrTextBlobCache
This should be the bulk of the work. The next part is getting it to live
in a common place, and wiring up the callbacks properly.

The callback points are fPurgeMore and fMessageBusID.

Change-Id: Ibabe285ace8a0b6531572b755a6c4f7bd41b1f6c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298400
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-06-25 15:32:21 +00:00
Michael Ludwig
e88320baec Update how sample(matrix) calls are invoked in SkSL
This removes the kMixed type of SkSL::SampleMatrix. All analysis of FP
sampling due to parent-child relationships is tracked in flags on
GrFragmentProcessor now.

The sample strategy is tracked as follows:
- An FP marks itself as using the local coordinate builtin directly (automatically done for .fp code based on reference to sk_TransformedCoords2D[0]).
- This state propagates up the parent towards the root, marking FPs as using coordinates indirectly. We stop the propagation when we hit a parent FP that explicitly samples the child because it becomes the source of the child's coordinates.
   - If that parent references its local coordinates directly, that kicks off its own upwards propagation.
- Being sampled explicitly propagates down to all children, and effectively disables vertex-shader evaluation of transforms.
   - A variable matrix automatically marks this flag as well, since it's essentially a shortcut to (matrix expression) * coords.
- The matrix type also propagates down, but right now that's only for whether or not there's perspective.
   - This doesn't affect FS coord evaluation since each FP applies its action independently.
   - But for VS-promoted transforms, the child's varying may inherit perspective (or other more general matrix types) from the parent and switch from a float2 to a float3.
- A SampleMatrix no longer tracks a base or owner, GrFragmentProcessor exposes its parent FP. An FP's sample matrix is always owned by its immediate parent.
   - This means that you can have a hierarchy from root to leaf like: [uniform, none, none, uses local coords], and that leaf will have a SampleMatrix of kNone type. However, because of parent tracking, the coordinate generation can walk up to the root and detect the proper transform expression it needs to produce, and automatically de-duplicate across children.

Currently, all FP's that are explicitly sampled have a signature of (color, float2 coord). FP's that don't use local coords, or whose coords are promoted to a varying have a signature of (color).
   - In this case, the shader builder either updates args.fLocalCoords to point to the varying directly, or adds a float2 local to the function body that includes the perspective divide.

GrFragmentProcessor automatically pretends it has an identity coord transform if the FP is marked as referencing the local coord builtin. This allows these FPs to still be processed as part of GrGLSLGeometryProcessor::collectTransforms, but removes the need for FP implementations to declare an identity GrCoordTransform.
   - To test this theory, GrTextureEffect and GrSkSLFP no longer have coord transforms explicitly.
   - Later CLs can trivially remove them from a lot of the other effects.
   - The coord generation should not change because it detects in both cases that the coord transform matrices were identity.

GrGLSLGeometryProcessor's collectTransforms and emitTransformCode has been completely overhauled to recurse up an FP's parent pointers and collect the expressions that affect the result. It de-duplicates expressions between siblings, and is able to produce a single varying for the base local coord (either when there are no intervening transforms, or the root FP needs an explicit coordinate to start off with).


This also adds the fp_sample_chaining GM from Brian, with a few more configurations to fill out the cells.

Bug: skia:10396
Change-Id: I86acc0c34c9f29d6371b34370bee9a18c2acf1c1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297868
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-06-25 14:48:34 +00:00
Adlai Holler
9d8a41c069 Reland "Ignore calls to freeGpuResources on abandoned contexts"
This reverts commit 4621428b04.

Reason for revert: It was not blocking the Chrome roll

Original change's description:
> Revert "Ignore calls to freeGpuResources on abandoned contexts"
> 
> This reverts commit ebea6d0133.
> 
> Reason for revert: Let's see if this is blocking the Chrome roll
> 
> Original change's description:
> > Ignore calls to freeGpuResources on abandoned contexts
> > 
> > GPU resources are freed during abandonment and so public calls to this
> > method should be ignored.
> > 
> > Bug: skia:10421
> > Change-Id: I18eb3fbd85cc95c1f2663e109237e5e271a95604
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298346
> > Auto-Submit: Adlai Holler <adlai@google.com>
> > Commit-Queue: Robert Phillips <robertphillips@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> 
> TBR=robertphillips@google.com,adlai@google.com
> 
> Change-Id: Ia49dae6d45deec8a628396fa43499f902691b1d3
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:10421
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298702
> Reviewed-by: Robert Phillips <robertphillips@google.com>

TBR=robertphillips@google.com,adlai@google.com

# Not skipping CQ checks because this is a reland.

Bug: skia:10421
Change-Id: Ifd169493bdf9d2164519948542fe5e00a63dc7b3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298996
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2020-06-25 14:36:05 +00:00
Michael Ludwig
9689e39a69 Update complex clip GMs to only use supported clip ops
Bug: skia:10207
Change-Id: Ie87d78b12874fb87697fe22856b4a83b9f28dda8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287818
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-06-25 14:15:25 +00:00
Brian Osman
5d164a2764 Initialize SkVertices::Sizes::fTotal
This value is used to determine if construction of the Sizes succeeded.
At some point, early returns were added to the constructor, causing
serialization code to use an uninitialized value if any of those early
returns triggered.

Bug: oss-fuzz:23697
Change-Id: I65479e30fd6fdf5d5f43dc1ea1247e18d546fa12
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298850
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-06-25 14:04:47 +00:00
Chris Dalton
a6858aed83 Don't write instance locations for unused resolve levels
This is a minor optimization for GrTessellatePathOp.cpp.

Bug: skia:10419
Change-Id: Ie9173f0827981aa254075820bee862f13a0ea333
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298902
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-06-25 13:57:38 +00:00
Chris Dalton
768adaa3c2 Remove GrMiddleOutCubicShader::kMaxResolveLevel
This should have been removed already. Everybody can just use
GrTessellationPathRenderer::kMaxResolveLevel instead.

Bug: skia:10419
Change-Id: If38e499ce6f74a7b052219c2cac2a402d3d05d8c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298901
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-06-25 13:28:57 +00:00
Herb Derby
adac288da5 Reland "simplify freeAll"
This is a reland of 3b6b747842

Original change's description:
> simplify freeAll
> 
> Change-Id: Ie0c396ee0f92bc16933a137270fc1601faf177f5
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298403
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Herb Derby <herb@google.com>

Change-Id: I6cd3f1b4e29682b9bdf555a8046f482890dc8498
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298848
Auto-Submit: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-06-25 13:16:58 +00:00
Adlai Holler
7580ad47b7 Add an sk_sp API for DDLs with a macro for staging
Chromium CL 2261229 adds the temporary opt-out.

Bug: skia:10425
Change-Id: I54f32f9389b31f8f83124ab1ea3f16f58cf248e8
Depends-On: Ie090d0cdcc4f6aeee1a845cecf699f4e2f7bd617
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298509
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-06-25 13:13:58 +00:00
skia-recreate-skps
e684c6daef Update Go Deps
Change-Id: Ice3f3379a437306f021e13cdccd697caee6107ea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298885
Reviewed-by: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
Commit-Queue: <skia-recreate-skps@skia-swarming-bots.iam.gserviceaccount.com>
2020-06-25 05:44:30 +00:00
skia-autoroll
d723551805 Roll ANGLE from 1496de215a39 to 6ef0387d581d (10 revisions)
1496de215a..6ef0387d58

2020-06-25 syoussefi@chromium.org Vulkan: Fix mipmap generation discarding levels above max
2020-06-25 jdarpinian@chromium.org Fix readBuffer validation
2020-06-24 cclao@google.com Vulkan: Batch vkUpdateDescriptorSets calls
2020-06-24 ianelliott@google.com Vulkan: Fix glBlitFramebuffer() for pre-rotation
2020-06-24 cwallez@chromium.org Suppress TextureTest failure on NVIDIA Shield.
2020-06-24 angle-autoroll@skia-public.iam.gserviceaccount.com Roll glslang from 839704450200 to fbb9dc2cf1af (1 revision)
2020-06-24 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 9167e1e22a46 to eb0a25a189b7 (3 revisions)
2020-06-24 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Loader from 7e8789fe571a to a173c025f8fe (1 revision)
2020-06-24 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from 76ddcca9f3a4 to 45c73d999ed8 (14 revisions)
2020-06-24 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from 36b5bb701da9 to 7a1af5878594 (4 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 lovisolo@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
Bug: None
Tbr: lovisolo@google.com
Test: Test: angle_deqp_gles3_tests --gtest_filter=dEQP.GLES3/functional_fbo_invalidate_\*Test: Test: angle_end2end_tests --gtest_filter=*EGLPreRotationLargeSurfaceTest.OrientedWindowWithBlitFramebuffer
Change-Id: I28aacf7f48178e7374dc2394f82b46af7f240032
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298878
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-06-25 04:45:19 +00:00
skia-autoroll
d6ee22f373 Roll Chromium from 66992a849fec to 6d759c2e5e1f (551 revisions)
66992a849f..6d759c2e5e

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 lovisolo@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: lovisolo@google.com
Change-Id: Ib8bba4b7dea0de09cf3b15d2f3746ff5b266f8bc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298876
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-06-25 04:43:49 +00:00
skia-autoroll
ec60ef9ab4 Roll dawn from 8ab3719fc486 to 2a6cc4f8fb40 (2 revisions)
https://dawn.googlesource.com/dawn.git/+log/8ab3719fc486..2a6cc4f8fb40

2020-06-25 jiawei.shao@intel.com Optimize B2T and T2B copies with multiple array layers on Metal
2020-06-23 brandon1.jones@intel.com Roll third_party/spirv-cross/ f9ae06512..2e7a56258 (1 commit)

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: I23e617bee2d2d867267eaf646aeb34a9aa6b537c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298877
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-06-25 04:34:49 +00:00
Robert Phillips
49f9437cc8 Revert "Be more consistent about calling release procs in SkImage factories"
This reverts commit f075414d63.

Reason for revert: blocking Chrome roll

Original change's description:
> Be more consistent about calling release procs in SkImage factories
> 
> I will follow this up with a Chrome-side CL to fix the call sites of the following factories:
>    MakeFromCompressedTexture
>    MakeFromTexture
>    MakeFromYUVATexturesCopyWithExternalBackend
>    MakeFromYUVTexturesCopyWithExternalBackend
>    MakeFromNV12TexturesCopyWithExternalBackend
> 
> Here is the Chrome-side CL: https://chromium-review.googlesource.com/c/chromium/src/+/2264598/ (Skia's SkImage::Make* factories now guarantee cleanup)
> 
> Bug: 1097484
> Change-Id: I65e6ce30c3dd906e2bfede6c8202d7fab5832da3
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298751
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: I306e3beb60461c89cc1980f6c7f3ad4900a34c76
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1097484
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298847
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-06-25 02:46:34 +00:00
Michael Ludwig
9861b7ca22 Switch inline variables to use a counter
Bug: skia:10424
Change-Id: Ic329b7de3a02034541094cd7b0cb4e458631e26f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298556
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-06-25 00:49:49 +00:00
Mike Reed
b11e627644 Move impl into SkColorFilterBase
No expected changes to results (or public call-sites)

Change-Id: Ia0c5cfe2dc3beda82d91454527eda2e68287afb6
Bug: skia:10426
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298559
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2020-06-25 00:26:11 +00:00
Brian Salomon
0e94f949d1 Remove unnecessary AsyncReadPixels command buffer disable.
Test now passes.


Change-Id: Iddc4cf3c34655fcc5b25ff3e168f9d637ea3079e
Bug: skia:9123
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298747
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-06-24 23:41:11 +00:00
Ethan Nicholas
1de1481594 Fixed an SkSL optimizer issue with collapsing static ifs / switches.
Change-Id: Ifbe0d569d4ee25f1ff971413b9494fcc7d7971c2
Bug: skia:10394
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297858
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-06-24 23:41:09 +00:00
Robert Phillips
f075414d63 Be more consistent about calling release procs in SkImage factories
I will follow this up with a Chrome-side CL to fix the call sites of the following factories:
   MakeFromCompressedTexture
   MakeFromTexture
   MakeFromYUVATexturesCopyWithExternalBackend
   MakeFromYUVTexturesCopyWithExternalBackend
   MakeFromNV12TexturesCopyWithExternalBackend

Here is the Chrome-side CL: https://chromium-review.googlesource.com/c/chromium/src/+/2264598/ (Skia's SkImage::Make* factories now guarantee cleanup)

Bug: 1097484
Change-Id: I65e6ce30c3dd906e2bfede6c8202d7fab5832da3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298751
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-06-24 23:36:07 +00:00
Chris Dalton
54c9093bb5 Pass the primProc and uniformHandler to tessellation shader back doors
Change-Id: I96e9fbaa2369b8b7c59bfcd6db7e09d23055d20e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298771
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-06-24 23:36:06 +00:00
Michael Ludwig
34878824fc Revert "Implement Skottie vs Lottie perf tool"
This reverts commit 8ee607cbc1.

Reason for revert: proto extension number collision blocking roll into google

Original change's description:
> Implement Skottie vs Lottie perf tool
> 
> Add PerfActivity to Skottie demo app, which can render
> with both Lottie and Skottie players. Create bash script, which
> runs 15 lottie files with both renderers, runs perfetto and
> outputs performance metrics in json files.
> 
> Test: ran run_perf.sh and it outpus perf metrics
> Change-Id: Ibc29d3a9dc7bfe79002bf91472e93883d746c03d
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296276
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Commit-Queue: Stan Iliev <stani@google.com>

TBR=djsollen@google.com,hcm@google.com,stani@google.com

Change-Id: I2de7feadf8ac2a5690c26e4e07b231af62502655
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298680
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-06-24 23:15:20 +00:00
Brian Salomon
9a5acc5a2d Add another make_get_error_with_random_oom valgrind suppression
First one worked for me locally, second one should work for bots.

Change-Id: Ib22e3507b910089a2516fab8dd41dfbc22d5862f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298822
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
2020-06-24 22:15:33 +00:00
Greg Daniel
632db1c742 Revert "Make glPatchParameteri required when tessellation is supported"
This reverts commit 7d7cd2b178.

Reason for revert: breaking chrome roll

Original change's description:
> Make glPatchParameteri required when tessellation is supported
> 
> Chrome started wrangling this entrypoint in the following CL:
> 
> https://chromium-review.googlesource.com/c/chromium/src/+/2253344
> 
> Change-Id: Ief4dfb1ddca8d86e0c09dfdc443e01830cb4de20
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298405
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

TBR=kjlubick@google.com,csmartdalton@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I569f2a16de156c5b2e819cb2a45ea942ca2cdec7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298819
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-06-24 20:48:42 +00:00
Michael Ludwig
d8f4f42b03 Revert "Simplify GrClip API"
This reverts commit 9716414e93.

Reason for revert: clipRRect elision seems to trigger precision issues on Nexus5x, see https://chrome-gpu-gold.skia.org/search?fdiffmax=-1&fref=false&frgbamax=255&frgbamin=0&head=true&include=false&issue=2264837&limit=50&master=false&match=name&metric=combined&neg=false&offset=0&pos=false&query=source_type%3Dchrome-gpu&sort=desc&unt=true

Original change's description:
> Simplify GrClip API
> 
> Removes quickContains(SkRect), quickContains(SkRRect), and isRRect().
> Replaces these three functions with preApply() that conservatively
> determines the clip effect up to a single rrect intersection. The major
> motivation for this is the new GrClipStack implementation. preApply()
> and apply() will be able to reuse much more code compared to separating
> the preApply functionality across the older three functions that were
> removed. Additionally, preApply is able to convey more information for
> less work, since it can usually determine being skipped or unclipped while
> determining if the clip is a single rrect.
> 
> As part of using this API, the attemptQuadOptimiziation and the equivalent
> rrect optimization are overhauled. Hopefully legibility is improved, and
> the rrect case is now applied outside of the android framework (but with
> tighter AA requirements).
> 
> Bug: skia:10205
> Change-Id: I33249dd75a28a611495f87b211cb7ec74ebb7ba4
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298506
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Chris Dalton <csmartdalton@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>

TBR=bsalomon@google.com,csmartdalton@google.com,michaelludwig@google.com

Change-Id: I850cbf92eea9cf5f2db5528a93251f02dbd6fee2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10205
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298753
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-06-24 18:58:25 +00:00
Jorge Betancourt
287c28c047 update gradle version for android projects
When building application from command line, ensure that your
out file has the args:

ndk="[absolute path to ndk]"
ndk_api="[specific ndk api number]"

Then run:
platform_tools/android/bin/android_build_app -C  out/[out dir] [application name]

Change-Id: Ib380e99bf2dc2e6c136388a0653e380c21e180ed
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298679
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2020-06-24 18:36:53 +00:00
Stephen White
8857497d72 Fix RTHeight for SkRuntimeEffectSimple case.
Don't append the RTHeight uniform if we're writing a sksl_synthetic_uniforms block.

Bug: skia:10418
Change-Id: I21600225be837bb60b878e53353be4d40454f475
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298557
Commit-Queue: Stephen White <senorblanco@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-06-24 18:17:53 +00:00
Greg Daniel
a026e91e69 Fix d3d PromiseImageTest
Change-Id: I713ebf481dda5264feb3c813f63c6cbe27fd18a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298749
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-06-24 18:12:53 +00:00
skia-autoroll
345e999a59 Roll dawn from 92379bff49c2 to 8ab3719fc486 (2 revisions)
Also includes GN file fixes for glslang.

https://dawn.googlesource.com/dawn.git/+log/92379bff49c2..8ab3719fc486

2020-06-23 enga@chromium.org Fix validation of multisampled BGL bindings
2020-06-22 rharrison@chromium.org Rolling 4 dependencies

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

Change-Id: I46f2d1ed1e137cfc2576fe7da34495f035fdac16
Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Debug-Dawn
Bug: None
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298437
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-06-24 17:35:33 +00:00
Brian Osman
fac4c0dc7e Reland "Remove SkSpecialImage::makeTextureImage"
SkSpecialImage::MakeFromImage now always produces a GPU-backed
result, if a recording context is passed in. This ensures that
all nodes (including SkImageSource) remain on the GPU, or go
directly there if we've got a GPU-backed skif::Context.

Bug: skia:9825
Bug: skia:10202
Change-Id: If65109d4e97855081998a30ca08947a21a3611c9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298678
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-06-24 17:00:14 +00:00
John Stiles
38b7d2f223 Add support for magenta highlights on shader mouseover in Metal.
Change-Id: Ia449e2cfd8b1153e7ab1cd7ad1916550aecf55ef
Bug: skia:10428
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298744
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-06-24 16:55:53 +00:00
Stan Iliev
8ee607cbc1 Implement Skottie vs Lottie perf tool
Add PerfActivity to Skottie demo app, which can render
with both Lottie and Skottie players. Create bash script, which
runs 15 lottie files with both renderers, runs perfetto and
outputs performance metrics in json files.

Test: ran run_perf.sh and it outpus perf metrics
Change-Id: Ibc29d3a9dc7bfe79002bf91472e93883d746c03d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296276
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Stan Iliev <stani@google.com>
2020-06-24 16:42:53 +00:00
Michael Ludwig
3824f58843 Revert "simplify freeAll"
This reverts commit 3b6b747842.

Reason for revert: maybe blocking chrome roll, linux-rel failing on ContextLost_WebGL2Blocked

Original change's description:
> simplify freeAll
> 
> Change-Id: Ie0c396ee0f92bc16933a137270fc1601faf177f5
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298403
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Herb Derby <herb@google.com>

TBR=herb@google.com,robertphillips@google.com

Change-Id: I635ac0b834c0a818285974bcad229ac98f3ebf57
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298745
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-06-24 16:39:04 +00:00
Ravi Mistry
1507d717ea Update path to fix Android ASAN bots
Bug: skia:10370
Change-Id: Iae6515b7e78c7660b4fb9fe32fd969ba563c4517
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298741
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2020-06-24 16:06:33 +00:00
Brian Salomon
24069ebd23 Add GrContext::oomed() and implement for GL and VK.
Surfaces to client whether GrContext has seen a GL_OUT_MEMORY,
VK_ERROR_OUT_OF_HOST_MEMORY, or VK_ERROR_OUT_OF_DEVICE_MEMORY error.

Bug: chromium:1093997
Change-Id: I8e9799a0f7d8a74df056629d7d1d07c0d0a0fe30
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298216
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-06-24 16:04:06 +00:00
John Stiles
03b92cd667 Fix crash in Viewer when attempting to view shaders in Metal.
Change-Id: Ia19063f13e74d7dc2f1ead1fad20ad6828a3648d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298742
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-06-24 15:34:53 +00:00
John Stiles
72e576492c Rename MakeResult so that it can be used more broadly.
MakeResult will be needed when migrating `asFragmentProcessor` calls.
However, the typename previously could not be forward-declared because
it was a type buried inside a class. Also, the name `MakeResult` seems
too tightly-coupled to the `Make` functions.

The type has been renamed to `GrFPResult` and moved out of
GrFragmentProcessor to allow `asFragmentProcessor` to use it without
actually #including GrFragmentProcessor.

Change-Id: Ic2c701b943aa64e0f922827b60084e58c67bfb8d
Bug: skia:10217
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298740
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-06-24 15:23:23 +00:00
Robert Phillips
900630c7cd Add GM::gpuSetup call in fm
I have a more complete fix in the works but this should unblock fm users.

Change-Id: I0af40f801f7d6d8c02b077b2e6b8ff2b875a4ad8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298707
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-06-24 15:16:56 +00:00
Michael Ludwig
9716414e93 Simplify GrClip API
Removes quickContains(SkRect), quickContains(SkRRect), and isRRect().
Replaces these three functions with preApply() that conservatively
determines the clip effect up to a single rrect intersection. The major
motivation for this is the new GrClipStack implementation. preApply()
and apply() will be able to reuse much more code compared to separating
the preApply functionality across the older three functions that were
removed. Additionally, preApply is able to convey more information for
less work, since it can usually determine being skipped or unclipped while
determining if the clip is a single rrect.

As part of using this API, the attemptQuadOptimiziation and the equivalent
rrect optimization are overhauled. Hopefully legibility is improved, and
the rrect case is now applied outside of the android framework (but with
tighter AA requirements).

Bug: skia:10205
Change-Id: I33249dd75a28a611495f87b211cb7ec74ebb7ba4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298506
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-06-24 15:12:12 +00:00
Robert Phillips
9977ab958f Misc changes to get *ooprdll configs running
Change-Id: I99d183dca8351b6d80dfacf62cd34bd7def6e23d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296749
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-06-24 15:10:53 +00:00
Mike Klein
b8219e4387 update ApplyMatrix signature
Change-Id: I92b12cba7dbb14c07174a77befd9dfddaec629af
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298636
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-06-24 14:45:52 +00:00
Greg Daniel
513e475c86 Make sure we hold refs to sampled textures in d3d.
Change-Id: Id2542457a361963d7052674bc875a66bd59b48d9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298676
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2020-06-24 14:33:26 +00:00
Robert Phillips
4621428b04 Revert "Ignore calls to freeGpuResources on abandoned contexts"
This reverts commit ebea6d0133.

Reason for revert: Let's see if this is blocking the Chrome roll

Original change's description:
> Ignore calls to freeGpuResources on abandoned contexts
> 
> GPU resources are freed during abandonment and so public calls to this
> method should be ignored.
> 
> Bug: skia:10421
> Change-Id: I18eb3fbd85cc95c1f2663e109237e5e271a95604
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298346
> Auto-Submit: Adlai Holler <adlai@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

TBR=robertphillips@google.com,adlai@google.com

Change-Id: Ia49dae6d45deec8a628396fa43499f902691b1d3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:10421
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298702
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-06-24 13:55:34 +00:00
Brian Osman
568d11301d Revert "Remove SkSpecialImage::makeTextureImage"
This reverts commit d34528c357.

Reason for revert: A handful of bad GM results. Going to try a better version.

Original change's description:
> Remove SkSpecialImage::makeTextureImage
> 
> Tweak how SkImageSource works, so that all nodes now remain on the GPU,
> or go directly there if we've got a GPU-backed skif::Context.
> 
> Bug: skia:9825
> Bug: skia:10202
> Change-Id: I35471fd41a00a0a9859eff04c26382e9d2d88a7b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298347
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>

TBR=robertphillips@google.com,brianosman@google.com,michaelludwig@google.com

Change-Id: I05c884fb3dd1c590def8f400f5090f0381ba67da
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9825, skia:10202
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298716
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-06-24 13:52:48 +00:00
Jim Van Verth
f8d25ef97d Disable one more D3D test
Bug: skia:9935
Change-Id: Ibbe25c629988f134b02f337c333a9cfc5c75a7a1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298677
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-06-24 13:47:41 +00:00
Robert Phillips
c23b732da6 Update viewer to call the gpuSetup GM entry point
Change-Id: Ic2562d985e144f25dcbb5cf40fafc86a33fb76c2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298505
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Trevor Barton <trevor.barton@sydstu.catholic.edu.au>
Reviewed-by: Kobi Robinson <kobi.robinson@sydstu.catholic.edu.au>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-06-24 13:43:59 +00:00
Kevin Lubick
d9b9e5ec4b [canvaskit] High performance Path APIs
https://skia-review.googlesource.com/c/skia/+/297896 draws
several paths with over 1000 points (one has ~250k) and
was pretty slow. We already had a way to provide a flat(ish)
array of all the verbs, points and weights mushed together
(although that should be cleaned up to prefer taking a 1d
array).

This adds an additional way to provide multiple verbs,
points, (and optionally weights, if conics are used) to CanvasKit.
This makes things dramatically faster because of batch copying
the values between JS and WASM (or using Malloc).

Additionally, the above CL revealed a need to be able to
use a subsection of a Malloc'd array efficiently. Thus,
I added subarray as a method of the Malloc object, which
can be used effectively as a pointer (i.e. no copying).

Change-Id: I2c1d26b25118fb9949e878b1b519d93efcfa5019
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297841
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2020-06-24 12:40:49 +00:00
Florin Malita
8268108731 Reland "[skottie] skottie_tool updates"
This reverts commit d424d6a3bd.

Reason for revert: ready to reland

Original change's description:
> Revert "[skottie] skottie_tool updates"
> 
> This reverts commit 6499e7fb4c.
> 
> Reason for revert: G3 roll
> 
> Original change's description:
> > [skottie] skottie_tool updates
> > 
> > 1) plumb a precomp interceptor to support nested animations, following
> >    the same naming pattern as viewer and dm
> > 
> > 2) clear background with white instead of transparent, to match other
> >    tools
> > 
> > TBR=
> > Change-Id: Ic1d1f8c6493a3ca98a9b75f5e2aa2230a46f54d9
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298139
> > Reviewed-by: Florin Malita <fmalita@chromium.org>
> > Commit-Queue: Florin Malita <fmalita@google.com>
> 
> TBR=fmalita@chromium.org,fmalita@google.com
> 
> Change-Id: Ibd320e9f7f30004e80ff4d2b2012a18703910842
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298337
> Reviewed-by: Florin Malita <fmalita@google.com>
> Commit-Queue: Florin Malita <fmalita@google.com>

TBR=fmalita@chromium.org,fmalita@google.com

# Not skipping CQ checks because this is a reland.

Change-Id: Id20c88771caf580519e1e92dc293933041522f7a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298561
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2020-06-24 11:18:44 +00:00
skia-autoroll
322e4be6a1 Roll ANGLE from 9daab8cbffb7 to 1496de215a39 (13 revisions)
9daab8cbff..1496de215a

2020-06-23 bpastene@chromium.org Remove implied CIPD packages from scripts/trigger.py
2020-06-23 syoussefi@chromium.org Vulkan: Remove DispatchHelper
2020-06-23 nguyenmh@google.com Re-enable presubmit commit message format check
2020-06-23 jmadill@chromium.org Update glslang_validator binary for Windows.
2020-06-23 syoussefi@chromium.org Add mip-related corner-case tests
2020-06-23 syoussefi@chromium.org Update glslang_validator binary for Linux.
2020-06-23 amaiorano@google.com Enable validation layer custom extensions
2020-06-23 angle-autoroll@skia-public.iam.gserviceaccount.com Roll glslang from e20ac35adbfd to 839704450200 (3 revisions)
2020-06-23 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from 71c1a611fdbb to 76ddcca9f3a4 (5 revisions)
2020-06-23 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from ae1007957f09 to 9167e1e22a46 (1 revision)
2020-06-23 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SPIRV-Tools from d4b9f576ebb4 to 36b5bb701da9 (1 revision)
2020-06-23 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-Tools from 977b7ccbacc1 to 0f4d5f74f199 (2 revisions)
2020-06-23 syoussefi@chromium.org Add mipmap generation perf test for emulated formats

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 lovisolo@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
Bug: chromium:812428
Tbr: lovisolo@google.com
Change-Id: Ica9fa321e0adc4e64f72aaadeebf455163ff9fa7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298602
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-06-24 04:46:00 +00:00