I meant to land this after https://crrev.com/2726103006 ,
but got sidetracked.
Change-Id: I4f0397302d41e89d2394bec545190cb024929bd8
Reviewed-on: https://skia-review.googlesource.com/17390
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
The previous workaround only handled the glClearColor(0,0,0,1) case,
it turns out we need to work around any glClearColor made up of entirely
0s and 1s.
R=bsalomon@google.com
Bug: 710443
Change-Id: I78a75559fc11811ad9a218436231354d66d2ad51
Reviewed-on: https://skia-review.googlesource.com/17327
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Eric Karl <ericrk@chromium.org>
This reverts commit 7f1ce29c9b.
Reason for revert: Maybe causing problems in imagemakewithfilter & dropshadowimagefilter
Original change's description:
> Update clearOp for split-OpList world
>
> It would reduce a lot of noise if the GrRenderTargetOpList kept a pointer to the GrCaps but, for now, I'm trying to shrink the GrRTOpList, not expand it.
>
> Change-Id: Ieed56fa2a41a3fb20234e26552ae2d301147e4f2
> Reviewed-on: https://skia-review.googlesource.com/17323
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
>
TBR=bsalomon@google.com,robertphillips@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: Ib23ce4515d9427759ebd2b6d4c9d3a670f00a153
Reviewed-on: https://skia-review.googlesource.com/17326
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This reverts commit 0b58ef7b52.
Reason for revert: Wasn't actually fixed.
Original change's description:
> Revert "Disable resource cache in shadow_utils GM for now"
>
> This reverts commit c34a946d5a.
>
> Reason for revert: This is probably fixed with https://skia-review.googlesource.com/c/17279/.
>
> Original change's description:
> > Disable resource cache in shadow_utils GM for now
> >
> > This should make the GMs more stable in tiled mode.
> >
> > Change-Id: I72996b1305fc99e60626af35267952d0a5c38624
> > Reviewed-on: https://skia-review.googlesource.com/17275
> > Reviewed-by: Mike Reed <reed@google.com>
> > Commit-Queue: Jim Van Verth <jvanverth@google.com>
> >
>
> TBR=jvanverth@google.com,reed@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Change-Id: I0d21652a301b3f81e7ec04638bedbaabc723e583
> Reviewed-on: https://skia-review.googlesource.com/17304
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
>
TBR=mtklein@google.com,jvanverth@google.com,reviews@skia.org,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: If606795bfeb4e6ed78f199fcb86ee2767bde5216
Reviewed-on: https://skia-review.googlesource.com/17371
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
I thought that SK_API on operator== was
redundant with SK_API on the enclosing class,
and was not needed. Turns out for mac_chromium_debug_ng
it is needed. Added comments for history.
Meanwhile, bookmaker found some missing and
mis-named parameters, so all is not lost.
R=reed@google.com
Change-Id: I88645666a9d06ec90c5ac133673460d6e6c75528
Reviewed-on: https://skia-review.googlesource.com/17277
Commit-Queue: Cary Clark <caryclark@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Also remove a deprecated interface in SkShadowUtils.
Change-Id: I32e67271be953f11071c512cb39a47ea1e7dcaaf
Reviewed-on: https://skia-review.googlesource.com/17266
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
It would reduce a lot of noise if the GrRenderTargetOpList kept a pointer to the GrCaps but, for now, I'm trying to shrink the GrRTOpList, not expand it.
Change-Id: Ieed56fa2a41a3fb20234e26552ae2d301147e4f2
Reviewed-on: https://skia-review.googlesource.com/17323
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Based on Android's shadowgrid2.
Change-Id: I33209b6b84fc63a762405c4988afbdbffcc170d6
Reviewed-on: https://skia-review.googlesource.com/17360
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Move the shader impl to a private class, leave SkPerlinNoiseShader as
a factory class only (similar to e.g. SkLightingShader).
Change-Id: Ic1180db8f5dfd3d8f6fba133c6bf6bbdfa4f97a4
Reviewed-on: https://skia-review.googlesource.com/17318
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Bot is failing without this.
BUG=skia:6591
Change-Id: I29cf5e18a7fa240d3e45bdadf83c1f91060f45f5
Reviewed-on: https://skia-review.googlesource.com/17319
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
This cannot land until after https://skia-review.googlesource.com/c/14186/ (Split up opLists (take 3)) sticks.
This is because, prior to that CL, the SurfaceProxies have a ref on the last OpList that wrote to them. Since this CL adds a IORef from a discardOp in an opList to the SurfaceProxy this can result in a loop. After the required CL sticks, opLists have a IORef on the SurfaceProxy to which they wrote and the SurfaceProxy just has a raw back pointer so there will be no loop.
Change-Id: I198035f5dd5a8fad549052dea6aaa61477a89844
Reviewed-on: https://skia-review.googlesource.com/16663
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
A non-zero base vertex in glDrawArrays appears to not always work on
Adreno.
Bug: skia:6650
Change-Id: I301eaba8c7790ed814a2ab8d8c53dd2b9e0d77d1
Reviewed-on: https://skia-review.googlesource.com/17083
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This CL relies on: https://skia-review.googlesource.com/c/14186/ (Split up opLists (take 3))
We can't/don't want to close the opList in the GrSurfaceContext dtor because we, semi-often, wrap a proxy in a utility SurfaceContext in order to upload data to it (e.g., when creating a proxy w/ data or in the texture strip atlas).
In the current set up, the "temporary fixes" in newRTOpList and newTextureOpList should prevent any out of order execution.
Change-Id: I8189db6ed59096d7b8c1704028df395f84e4a681
Reviewed-on: https://skia-review.googlesource.com/14187
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: 722855
Change-Id: Id3661be1e9747ac0de1e35b60d334ee8187a5be5
Reviewed-on: https://skia-review.googlesource.com/17312
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
SkPath::getGenerationID() calls SkPathRef's, which is where the race is.
Change-Id: I71296b32148c8cda2d2b2fe249ef6b9ef84fcfe0
Reviewed-on: https://skia-review.googlesource.com/17316
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Bug: 723149
Change-Id: Ib56a77958fc1b7e026ee5ca98a46e8f014fe75d4
Reviewed-on: https://skia-review.googlesource.com/17309
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
Bug: skia:6591
Change-Id: Ic2ec5b033965ca073a00e272693b1c5e1d0ad69f
Reviewed-on: https://skia-review.googlesource.com/16541
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
This reverts commit c34a946d5a.
Reason for revert: This is probably fixed with https://skia-review.googlesource.com/c/17279/.
Original change's description:
> Disable resource cache in shadow_utils GM for now
>
> This should make the GMs more stable in tiled mode.
>
> Change-Id: I72996b1305fc99e60626af35267952d0a5c38624
> Reviewed-on: https://skia-review.googlesource.com/17275
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
>
TBR=jvanverth@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I0d21652a301b3f81e7ec04638bedbaabc723e583
Reviewed-on: https://skia-review.googlesource.com/17304
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
SkPath is not threadsafe. Gotta use PreCachedPath.
TSAN is showing a race in SkPathRef::genID() to write the fGenerationID.
Change-Id: I42d6ecadaa754a3c6796ca465981de430a0abb84
Reviewed-on: https://skia-review.googlesource.com/17279
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
This should make the GMs more stable in tiled mode.
Change-Id: I72996b1305fc99e60626af35267952d0a5c38624
Reviewed-on: https://skia-review.googlesource.com/17275
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
The bug linked in this CL was caused by the switch to SkJumper -
where we decided to stop interpolating table-lookups.
In this case, the image has tables with two entries: 0, 1.
This fixes the bug by optimizing away the table lookup for
these trivial no-op tables. I think this is a good change
on its own. We see these tables fairly regularly.
A more robust fix would expand "small" tables into larger
ones through interpolation. Should we also do this?
Bug: 722855
Change-Id: I3881734c6f28b5519cbe593dd05cc7b6b1b8a9d0
Reviewed-on: https://skia-review.googlesource.com/17272
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>
This demonstrates a new kind of hybrid unit test/GM.
It creates a grid of cells. In each cell, we do two
renders that are expected to produce the same result.
For each cell, we render the two results overlaid,
and highlight any differing pixels in red. Assuming
there is a diff, the area around the largest diff
is drawn zoomed in from both images.
Matching cells are outlined in green, failing cells
are outlined in red. Triaging this GM just involves
answering the question: "Are there any red boxes?"
"Good" example: https://screenshot.googleplex.com/909P3tvS55f.png
"Bad" example: https://screenshot.googleplex.com/oXBWbEKw5ur.png
To get more tests to pass, (and fix an assert
in Ganesh), I've gone ahead and enforced that user
supplied rects (in drawRect and drawOval) are
always sorted once they hit the canvas virtuals.
Currently, drawArc rejects empty ovals, but I added
the same assert to onDrawArc, if we decide to change
the strategy there.
Re-land of: https://skia-review.googlesource.com/c/16983/
Bug: skia:
Change-Id: I48f85de5f2bcb7fdc9558c2fd80cb1f20800b244
Reviewed-on: https://skia-review.googlesource.com/17270
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit 78d1b428a8.
Reason for revert: break preabandongpu bot
Original change's description:
> Add GM to verify that drawX == (path.addX, drawPath)
>
> This demonstrates a new kind of hybrid unit test/GM.
> It creates a grid of cells. In each cell, we do two
> renders that are expected to produce the same result.
> For each cell, we render the two results overlaid,
> and highlight any differing pixels in red. Assuming
> there is a diff, the area around the largest diff
> is drawn zoomed in from both images.
>
> Matching cells are outlined in green, failing cells
> are outlined in red. Triaging this GM just involves
> answering the question: "Are there any red boxes?"
>
> "Good" example: https://screenshot.googleplex.com/909P3tvS55f.png
> "Bad" example: https://screenshot.googleplex.com/oXBWbEKw5ur.png
>
> To get more tests to pass, (and fix an assert
> in Ganesh), I've gone ahead and enforced that user
> supplied rects (in drawRect and drawOval) are
> always sorted once they hit the canvas virtuals.
> Currently, drawArc rejects empty ovals, but I added
> the same assert to onDrawArc, if we decide to change
> the strategy there.
>
> Bug: skia:
> Change-Id: I021a18c85e234298e1d29f333662683d996dd42c
> Reviewed-on: https://skia-review.googlesource.com/16983
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Mike Reed <reed@google.com>
>
TBR=mtklein@chromium.org,mtklein@google.com,brianosman@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Bug: skia:
Change-Id: Id1ead4e22115c49cad5d0adb6151ede81734b4d3
Reviewed-on: https://skia-review.googlesource.com/17269
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Stores the config, origin, and dimensions in GrSurfaceProxy, sample count in GrRenderTargetProxy, and "was constructed with mip maps" in GrTextureProxy.
Change-Id: Iee058674dce49107a991cca9d083cd33e3572809
Reviewed-on: https://skia-review.googlesource.com/17209
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Bug: skia:
Change-Id: Ia4f892368fceda4a99490f5bd29851837a7a6927
Reviewed-on: https://skia-review.googlesource.com/17212
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>