This reverts commit 317a1857f8.
Reason for revert: Valgrind requires reverting ancestor commit.
Original change's description:
> mark SkRasterPipelineBlitter final
>
> This devirtualizes the call from blitAntiH to blitH,
> and makes sure no future self calls will be virtual.
>
> Change-Id: I2a277bbc1450a96e07794791792d59e5f806bde0
> Reviewed-on: https://skia-review.googlesource.com/17418
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
>
TBR=mtklein@chromium.org,herb@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: Ic726fd6b9bf18c397812ecc256353ab4a0a336c5
Reviewed-on: https://skia-review.googlesource.com/17522
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: I2869f97a14f3a1363ebfef5d657bd6468fc991f7
Reviewed-on: https://skia-review.googlesource.com/17491
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN
Change-Id: Ic8c5d95fdb899cb5293b2bc456f61b1637ec3aed
Reviewed-on: https://skia-review.googlesource.com/17489
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Change-Id: Ic7f76681a037d8f53a6fdc25061c39559f5c3e30
Reviewed-on: https://skia-review.googlesource.com/17457
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This devirtualizes the call from blitAntiH to blitH,
and makes sure no future self calls will be virtual.
Change-Id: I2a277bbc1450a96e07794791792d59e5f806bde0
Reviewed-on: https://skia-review.googlesource.com/17418
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Change-Id: I2482972a43cb89a93cbfb9e708614e0334002e53
Reviewed-on: https://skia-review.googlesource.com/17483
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
This CL fixes:
isConfigTexturable was returning true for:
kRG_float for ANGLE ES2 configs
isConfigRenderable was returning true for:
kAlpha_8 for ANGLE ES2 configs
isConfigTexturable and isConfigRenderable were returning true for:
SBGRA on ES2
The NexusPlayer was marking RGBA & RG float configs as renderable but not textureable
Bug: 720325
Change-Id: If21361870dbdde8f3e09bc9dff3a394f2a329157
Reviewed-on: https://skia-review.googlesource.com/17387
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Bug: skia:
Change-Id: I2966a5f6d1c0a953d5fe0d257550ae7f16e87e41
Reviewed-on: https://skia-review.googlesource.com/17455
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Previously we were using AVX2 instructions to generate the masks,
and AVX2 instructions for the mask load and stores themselves.
AVX came with float mask loads and stores, which will work perfectly
fine. I don't really get what the point of the 32-bit int loads and
stores are in AVX2, beyond maybe syntax sugar?
Change-Id: I81fa55fb09daea4f5546f8c9ebbc886015edce51
Reviewed-on: https://skia-review.googlesource.com/17452
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
I expanded an existing bench to show off the difference:
SkRasterPipeline_…
300 …compile 1x …run 1.14x
Change-Id: I5d63d602cda3f78d2d0891fcc85baf5514632900
Reviewed-on: https://skia-review.googlesource.com/17458
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
This refactors the factories so that the create-from-paint factory is a
front-patch to the create-from-shader-pipeline factory. Feature-wise,
we make the pre-baked shader pipeline responsible for modulating by
paint alpha; the factory only adds when creating from the paint.
We can fold the alpha into the colors in drawVertices, which makes it
run a bit faster, dropping the need for a scale_1_float runtime stage.
This causes a few invisible diffs on the "vertices" GM, but everything
else draws the same.
Change-Id: I3eeacc9aafbce2023ab18991bbb68c35645e9387
Reviewed-on: https://skia-review.googlesource.com/17395
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
The new bench demos the speedup:
SkRasterPipelineReuse_…
…full 1x …some 1.8x …none 5.22x
Change-Id: I5e51fb4316ae04558710ce62560850584ccb4aea
Reviewed-on: https://skia-review.googlesource.com/17449
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Somehow this improves the imagefilterscropped gm.
This also makes it easier for me to manually parse
PDF output for debugging.
Change-Id: I3af39f4b0ca3fc7fcdeec4825bf8649bd9544917
Reviewed-on: https://skia-review.googlesource.com/17413
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Using the float iota was just an expedient to write the stage...
this CL adds the U32 iota that dither really wants.
Change-Id: I7990b10afd0c5277186b6b8e730245d291bcef0c
Reviewed-on: https://skia-review.googlesource.com/17441
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
This used to need to be complicated to check for unimplemented stages,
but now that SkJumper rules the world, we can make this a lot simpler
and move a lot of the tricky stage selection logic into an SkOnce.
This should decrease the overhead of SkRasterPipeline::run().
Change-Id: I79d73f3315c7a1a52ab02747a5f17ce27d8cb9a4
Reviewed-on: https://skia-review.googlesource.com/17440
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
This reverts commit 766f9cd555.
Reason for revert: unit test failures, I think on bots running portable code path
Original change's description:
> dither copies when decreasing precision
>
> Still seeing the same 4444 diffs on copyTo4444 and all_bitmap_configs,
> and now also 565 in all_bitmap_configs.
>
> BUG=chromium:720105
>
> Change-Id: I19406f57aa6d2b2f98d98c093da302b004c7cd8b
> Reviewed-on: https://skia-review.googlesource.com/17419
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Matt Sarett <msarett@google.com>
>
TBR=mtklein@chromium.org,msarett@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:720105
Change-Id: Ia9ece7dccef325233b870102ab38fbed2336b95d
Reviewed-on: https://skia-review.googlesource.com/17442
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Still seeing the same 4444 diffs on copyTo4444 and all_bitmap_configs,
and now also 565 in all_bitmap_configs.
BUG=chromium:720105
Change-Id: I19406f57aa6d2b2f98d98c093da302b004c7cd8b
Reviewed-on: https://skia-review.googlesource.com/17419
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Matt Sarett <msarett@google.com>
Previosuly, we would (accidentally) always use just yuv.
Bug: 713862
Change-Id: I00acc6ca2841ba0636494119b7b4f46a9deee401
Reviewed-on: https://skia-review.googlesource.com/17406
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
This CL, just to limit its size/complexity, only handles
colors but not textures. Future CLs will cover everything.
Performance is pretty exciting. Its faster than the old code-path,
and when we fix a bug in pathutils to preserve opaqueness, it gets
a lot faster (8 -> 5)
Bug: skia:
Change-Id: I4113060e25fe25fe4e6a0ea59bd4fa5e33abc668
Reviewed-on: https://skia-review.googlesource.com/17276
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
This fixes the attributes on sk_VertexID, and a backwards test on
SkSL::String::startsWith and ::endsWith.
Change-Id: Icfddfc8ca95454d8646a1771761685c2525b296e
Reviewed-on: https://skia-review.googlesource.com/17398
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
I suspect that this will fix the failing golden image tests.
Bug: skia:
Change-Id: I9f88206ae782e6a04817e72cdfcb3e0c4bdaa293
Reviewed-on: https://skia-review.googlesource.com/17393
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Bug: skia:
Change-Id: Ida3a1ff3f78db2498a6dfc655d8be4de8ad912c7
Reviewed-on: https://skia-review.googlesource.com/17380
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Mike Reed <reed@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>
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>
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>
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>
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>
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>