Commit Graph

49400 Commits

Author SHA1 Message Date
Adlai Holler
96ead54a69 Reland "Consolidate GrDrawingManager <-> GrRenderTask lifecycle"
This reverts commit 65888b81cf.

Reason for revert: Fixed underlying issue http://crbug.com/1097620

Original change's description:
> Revert "Consolidate GrDrawingManager <-> GrRenderTask lifecycle"
>
> This reverts commit 6f1487fe80.
>
> Reason for revert: http://crbug.com/1097620
>
> Original change's description:
> > Consolidate GrDrawingManager <-> GrRenderTask lifecycle
> >
> > This creates a funnel in the drawing manager (removeRenderTasks) that
> > opens the door for tighter integration between the two classes. Also we
> > add some assertions about the relationship and cut out duplicated code.
> >
> > Bug: skia:10372
> > Change-Id: I0781ba7d45ac090cf7f6d430f0d56afe0f98b7e0
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297195
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > Commit-Queue: Adlai Holler <adlai@google.com>
>
> TBR=robertphillips@google.com,adlai@google.com
>
> Change-Id: I5d34ada1838d206d8a33294427d459c36ad6b740
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:10372
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298137
> Auto-Submit: Adlai Holler <adlai@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>

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

Bug: skia:10372
Change-Id: I9c83d4b2dc10b9db576d506b461b596b94afbc8d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298339
Reviewed-by: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2020-06-26 14:09:05 +00:00
Robert Phillips
e393901771 More *ooprddl GM changes
This should be final batch before we can enable the *ooprddl configs on the bots.

Change-Id: I9a7a619f7bcf0d5acea0e008cefbbb146d4c5244
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298746
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-06-26 13:58:38 +00:00
Robert Phillips
d26d25ed67 Make gpuSetup draw a error message on failure
Since gpuSetup can preempt draw's execution it needs to draw the error message too.

This is pulled out of the gpuSetup refactoring.

Change-Id: Iafe06d924fc1b694c59aa3100e9fbe95c4773222
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299140
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-06-26 13:50:35 +00:00
Michael Ludwig
e6c33eabe0 Don't erase child optimization flags
The matrix effect and the device-space effect only change the coordinates
the child FP is evaluated at. Any optimization based on the child's color
behavior is still valid.

Change-Id: Ib92fb0c627ec18c7eac85e9d4162e47866694d4f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298065
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-06-26 13:29:15 +00:00
skia-autoroll
17b12095eb Roll Chromium from 6d759c2e5e1f to 86c1522319ef (594 revisions)
6d759c2e5e..86c1522319

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: I6e1a68fcaee7b53736f7ed6833822f00b071d083
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299247
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-06-26 04:47:02 +00:00
skia-autoroll
8e37f613cb Roll ANGLE from 6ef0387d581d to c81da1c809fe (11 revisions)
6ef0387d58..c81da1c809

2020-06-26 syoussefi@chromium.org Vulkan: Avoid double-copy when generating mipmap
2020-06-25 syoussefi@chromium.org Vulkan: Remove debug symbols from internal shaders
2020-06-25 jonahr@google.com CGL: Add basic multithreading support
2020-06-25 jonahr@google.com Add basic multithreading support to GLX
2020-06-25 cclao@google.com Update style guide for reference on container object
2020-06-25 m.maiya@samsung.com Vulkan: Handle overflow in maxCombinedUniformComponents computation
2020-06-25 cnorthrop@google.com Capture/Replay: Fixups for draw surface
2020-06-25 cwallez@chromium.org Suppress EGLFeatureControlTest on Linux AMD
2020-06-25 cwallez@chromium.org Suppress MipmapTest failure on NVIDIA Shield.
2020-06-25 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Vulkan-ValidationLayers from 45c73d999ed8 to d8b1aa1c3830 (3 revisions)
2020-06-25 syoussefi@chromium.org Vulkan: Fix CPU path copy of 2D array textures

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:1087084,chromium:1097750
Tbr: lovisolo@google.com
Test: Test: Capture and replay sample of gfxbench
Change-Id: I8e5bcb82bdf2877abe5657c567d287fb8119cf35
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299257
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
2020-06-26 04:46:02 +00:00
Greg Daniel
c72d7a58a3 Add default flush calls to gpu backend.
Change-Id: I7cd8ff975502128dbde86397218b7e5c115cdaa6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299141
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-06-26 01:45:55 +00:00
Michael Ludwig
c19b9c5886 androidFramework_replaceClip proposal
Expose a android framework-only function to reset the saved clip geometry
a device-space pixel rect (e.g. the device clip restriction). Using a
regular intersect clip operation after this call should match the
behavior of the legacy replace operation with a clip restriction.

This is a step to removing the separate device clip
restriction API and the deprecated expanding clip ops, as part of the
plan described here: https://docs.google.com/document/d/1ddIk74A1rL5Kj5kGcnInOYKVAXs3J2IsSgU5BLit0Ng/edit?usp=sharing

Bug: skia:10207
Bug: skia:10209

Change-Id: I57d3bcc7b5b257935eb2bf2099d472f2ef354d5b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298824
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-06-25 21:54:11 +00:00
Michael Ludwig
a693a4704e Revert "clean up after big refactor of SkColorFilter --> ...Base"
This reverts commit 6dc67b1538.

Reason for revert: tripping up asan

Original change's description:
> clean up after big refactor of SkColorFilter --> ...Base
> 
> Change-Id: I67ba7db1a1e4e0c8deb5299a6580a669cc08f38c
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299056
> Reviewed-by: John Stiles <johnstiles@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=reed@google.com,johnstiles@google.com

Change-Id: Id157fed27d517a33ae235307247ab57dc605eac6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298979
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2020-06-25 21:41:24 +00:00
Florin Malita
02616ea90b [skrive] Add dm source
Change-Id: I09b8f8bb95dac443b64d85340db12f59f8977654
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299143
Auto-Submit: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-06-25 21:02:32 +00:00
John Stiles
29c70f2bb6 Update SkComposeColorFilter to support an input FP.
Change-Id: Idbc4a0786630782cfac9a39b41770c5ef85f3e6d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298754
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-06-25 20:10:02 +00:00
Jim Van Verth
c1a67b5b15 Implement Direct3D semaphores
Change-Id: Iadfa14965bbe11cfea556ade5d46e264f0ace61a
Bug: skia:9935
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298752
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-06-25 20:07:21 +00:00
Adlai Holler
7e16715806 Remove outdated comment
fFlushState is indeed gone, and the flush state does live on the stack.

Change-Id: Idbfda4965dbc66180d42294d10fa95308fbf3838
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299196
Commit-Queue: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-06-25 19:56:41 +00:00
Brian Osman
ac9d3f6f07 Cleanup of GrSkSLFP
- Move child processor function generation into a separate utility
- No need to pass coords to expandFormatArgs, just use args.fSampleCoord
- Rather than a two-character escape sequence for format args (that
  requires special handling of '%'), use a single character that's never
  legal elsewhere. Simplifies the arg expansion logic, and removes the
  need to special-case operator% in the generator.
- Change the type of GLSLFunction::fBody to avoid round-trip casting

Change-Id: Id242b86ab6ee14b8c92c81c1f062810034e71a96
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299078
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-06-25 18:06:21 +00:00
Brian Salomon
1af72d1786 Make GrBicubicEffect also support centripetal Catmull-Rom kernel.
Use in GrSurface::rescale().

Second time trying this.

Change-Id: I9cd6f83e1e1a06da9297cd1f3843c8b66ab71bb5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299016
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-06-25 17:49:06 +00:00
John Stiles
c36b8aa527 Add support for passing an inputFP to SkColorFilter objects.
The existing two-argument `asFragmentProcessor` method has been
supplanted by a new three-argument API that also takes an input FP and
returns a GrFragmentProcessor::MakeResult. A helper method
`colorFilterAcceptsInputFP` has also been added; SkColorFilters
that have been updated to absorb an input FP must also override this
method to return `true`.

Calling the "wrong" `asFragmentProcessor` method is supported. If you
invoke the newer, input-FP-consuming method on an older ColorFilter,
we detect this, and RunInSeries is used to emulate this support. If you
invoke the no-input-FP method on a newer ColorFilter, nullptr is
automatically passed in for the input FP. All of these assistance
features are transitional only, and will be removed once we have
completed the migration to the new API.

This CL also migrates SkLumaColorFilter and SkColorFilter_Matrix to the
new API to exercise the new functionality.

Change-Id: I49f9d962c8c0003a5e27a9675150f6783d631141
Bug: skia:10217
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298507
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-06-25 17:47:56 +00:00
Eric Boren
d7e55629a0 bin/try: automatically set 'git cl issue' when not found
This eases the workflow for developers who don't use git-cl to upload
changes, but it doesn't remove the dependency on git-cl for triggering
try jobs. Doing so would require using the Buildbucket API directly,
which we're not well set up to do in Python. Eventually we'll be forced
to either migrate this tool to Python 3 or rewrite in Go, and at that
point we can use the API clients we already use from Go code to remove
the dependency on Depot Tools.

Change-Id: I749007a2150cfeb2442643db6f2a01a7a56c10a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298748
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-06-25 17:44:01 +00:00
Mike Reed
6dc67b1538 clean up after big refactor of SkColorFilter --> ...Base
Change-Id: I67ba7db1a1e4e0c8deb5299a6580a669cc08f38c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299056
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-06-25 17:42:51 +00:00
Adlai Holler
6c9bb62a28 Have the drawing manager ref & unref DDLs on playback
Change-Id: I95f6dbfed9bb3ce75ecb260137d11b72e3953d75
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298820
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
2020-06-25 17:38:01 +00:00
Florin Malita
3d273d0034 [skrive] Initial render plumbing
TBR=
Change-Id: I425463c2f6cf4eda510ec573517472e10bdedb68
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299137
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-06-25 17:27:06 +00:00
Robert Phillips
b795bea220 Add GM::gpuTeardown entry point
This call will bookend gpuSetup calls. Any GM that implements onGpuSetup should also implement onGpuTeardown.

This is pulled out of the gpuSetup refactoring.

Change-Id: If55599dc26370f589c5cafd20a7ccb9019b424cc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299138
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-06-25 17:13:58 +00:00
Robert Phillips
83b749a706 Add GM::onceBeforeDraw method that encapsulates calling onOnceBeforeDraw
This is pulled out of the gpuSetup refactoring in an attempt to break it into simpler bits.

Change-Id: I01e1717b7f046ad4b87a3f38ac201347a51041ff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299077
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-06-25 17:03:48 +00:00
Ben Wagner
7000ccdffd Cleanup for TextLine::getGlyphPositionAtCoordinate.
Rename a few variables to make existing issues apparent. Also fix
potential divide by zero.

Change-Id: I071c4958f6eb2dcb79d34b4be95f57a4bbcb7b32
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298750
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-06-25 16:27:39 +00:00
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