Commit Graph

16555 Commits

Author SHA1 Message Date
Brian Osman
b5b26a9d29 Revert "mark SkRasterPipelineBlitter final"
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>
2017-05-22 19:24:56 +00:00
Brian Osman
b03d69f070 Revert "fix ubsan warning"
This reverts commit 4d1c5d676e.

Reason for revert: Valgrind requires reverting ancestor commit.

Original change's description:
> fix ubsan warning
> 
> 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>
> 

TBR=mtklein@chromium.org,herb@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN

Change-Id: Idbfdc4773756aa475829c1421d10d6f341081d7b
Reviewed-on: https://skia-review.googlesource.com/17521
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-05-22 19:24:26 +00:00
Brian Salomon
7128fdd82d Remove kZeroCopy_GrSurfaceFlag
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>
2017-05-22 18:50:58 +00:00
Mike Klein
4d1c5d676e fix ubsan warning
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>
2017-05-22 18:13:17 +00:00
Mike Reed
edf8a76219 add helper static to SkColorSpaceXform
Bug: skia:
Change-Id: I62525b392dfbae3d7075cf7f14e30780bad41279
Reviewed-on: https://skia-review.googlesource.com/17485
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-05-22 18:08:13 +00:00
Jim Van Verth
4123d0ff86 Add serialization support for drawShadowRec
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>
2017-05-22 18:02:53 +00:00
Robert Phillips
ee26363aaa Remove compressed (ETC1) texture support from Ganesh
Change-Id: If4cf286df87ea87338aba47001d90a5fcc4f2667
Reviewed-on: https://skia-review.googlesource.com/17456
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-05-22 18:02:52 +00:00
Mike Klein
317a1857f8 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>
2017-05-22 18:00:51 +00:00
Mike Klein
8110b849d6 add tilers against 1
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>
2017-05-22 17:55:59 +00:00
Robert Phillips
b7b7e5fba0 Add fixes & test for isConfigTexturable and isConfigRenderable
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>
2017-05-22 17:55:48 +00:00
Brian Osman
e2fc563234 Switch to SkVertices version of drawVertices
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>
2017-05-22 17:39:08 +00:00
Mike Klein
139e463dc6 We can mask load and store with just AVX.
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>
2017-05-22 17:08:19 +00:00
Mike Klein
0a76b413ea add compile, use it in blitter
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>
2017-05-22 16:41:22 +00:00
Mike Klein
b35cb3143e refactor SkRasterPipelineBlitter
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>
2017-05-22 14:28:15 +00:00
Mike Klein
1859f69d20 some basic speed ups for SkRasterPipeline::append()
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>
2017-05-22 14:08:06 +00:00
Hal Canary
66f6b1fb48 SkPDF: eliminate unnecessary clip for each page
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>
2017-05-22 12:50:39 +00:00
Brian Salomon
d34edf3dc9 Revert "Revert "Remove GrSurfaceDesc member from GrSurface.""
This reverts commit 4b30a96a3e.

Bug: skia:
Change-Id: I14d5b402c87df8fffbc29f16686fcfa18474fc48
Reviewed-on: https://skia-review.googlesource.com/17408
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-05-21 11:41:17 +00:00
Mike Klein
5d7f2b5301 tidy up dither stage
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>
2017-05-20 17:47:43 +00:00
Mike Klein
9f52e98e60 streamline SkRasterPipeline::run()
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>
2017-05-20 17:29:45 +00:00
Mike Klein
580d81fb33 Revert "dither copies when decreasing precision"
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>
2017-05-20 17:27:26 +00:00
Mike Klein
766f9cd555 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>
2017-05-20 16:37:12 +00:00
Matt Sarett
2f68787783 SkWebpEncoder: use bgra for lossless and yuv for lossy
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>
2017-05-19 23:35:46 +00:00
Greg Daniel
49354a30ea Update Porter Duff analysis to match LCD logic.
Bug: skia:
Change-Id: Ib222c37f7ebb307752806829742a3b6278dbae3d
Reviewed-on: https://skia-review.googlesource.com/17410
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-05-19 20:57:47 +00:00
Mike Reed
0264095cfd stage version of vertices
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>
2017-05-19 19:43:06 +00:00
Ethan Nicholas
985febffa2 minor skslc bugfixes
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>
2017-05-19 18:50:32 +00:00
Greg Daniel
d547fb602d Comment out lcd assert to make GLPrograms test happy
TBR=bsalomon@google.com

Bug: skia:6661
Change-Id: I944d05c31d3d5511f3c1679c9eb689dbcfbbb109
Reviewed-on: https://skia-review.googlesource.com/17399
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-05-19 18:32:52 +00:00
Greg Daniel
6ebe4b9dbe Fix gpu lcd blending to semi-correctly handle alpha coverage
Bug: skia:6606
Change-Id: I16ccd97f5d047eb7fddfed5310bf669e7435ccdd
Reviewed-on: https://skia-review.googlesource.com/17370
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-05-19 17:20:33 +00:00
Matt Sarett
09e9f68625 Temporarily use default webp encode method for bzl
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>
2017-05-19 17:20:23 +00:00
Mike Reed
7346a1f3b7 detect (and preserve) if patch colors are opaque
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>
2017-05-19 15:47:39 +00:00
Eric Karl
aeaf22bb07 Updated workaround for Intel 6xxx clear to 0/1 bug
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>
2017-05-19 15:01:03 +00:00
Robert Phillips
33f8315b74 Revert "Update clearOp for split-OpList world"
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>
2017-05-18 20:57:51 +00:00
Jim Van Verth
3af1af9e97 Remove ambient and spot mask filters.
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>
2017-05-18 19:45:45 +00:00
Robert Phillips
7f1ce29c9b 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>
2017-05-18 19:43:55 +00:00
Greg Daniel
4b30a96a3e Revert "Remove GrSurfaceDesc member from GrSurface."
This reverts commit 84911546b9.

Reason for revert: Breaking bots possibly?

Original change's description:
> Remove GrSurfaceDesc member from GrSurface.
> 
> Change-Id: I0fe979994e1e3fc457b952dfb5e0090c45fad771
> Reviewed-on: https://skia-review.googlesource.com/17273
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> 

TBR=bsalomon@google.com,robertphillips@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I404e509fcd3e3d5527b3bc6e286b7d436c12e879
Reviewed-on: https://skia-review.googlesource.com/17364
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-05-18 18:13:48 +00:00
Florin Malita
14d54c207d Hide SkPerlinNoiseShader impl details
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>
2017-05-18 17:24:39 +00:00
Brian Salomon
84911546b9 Remove GrSurfaceDesc member from GrSurface.
Change-Id: I0fe979994e1e3fc457b952dfb5e0090c45fad771
Reviewed-on: https://skia-review.googlesource.com/17273
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-05-18 16:56:50 +00:00
Robert Phillips
955235fa13 Switch over GrDiscardOp to IORef-ing the GrRenderTargetProxy
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>
2017-05-18 16:56:30 +00:00
Chris Dalton
9926f4bf65 Add drawArraysBaseVertexIsBroken flag
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>
2017-05-18 16:41:10 +00:00
Robert Phillips
a4c93ac535 Add check for incorrect opList splits
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>
2017-05-18 16:30:25 +00:00
Brian Salomon
d1eaf49e0b Revert "Revert "Remove GrSurface::desc() method.""
This reverts commit c96da1e51e.

Bug: skia:
Change-Id: I8242400a137413c01c7ef614b4fa733be7dcf939
Reviewed-on: https://skia-review.googlesource.com/17311
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-05-18 16:20:55 +00:00
Matt Sarett
9d2d7bfc92 Expand small tables in SkColorSpaceXform_A2B
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>
2017-05-18 16:15:05 +00:00
Mike Klein
d06126a818 Pre-cache SkPath's genID in PreCachedPath too
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>
2017-05-18 15:50:39 +00:00
Matt Sarett
b2004f76e2 Fix SkImage::onMakeColorSpace() for subset lazy images
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>
2017-05-18 15:14:59 +00:00
Florin Malita
c6c9018dd7 Remove unused SkZeroShaderContext
Change-Id: I3e9d9cb9c2f948b0bb363871e038ade1cf2f3d67
Reviewed-on: https://skia-review.googlesource.com/17308
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-05-18 15:09:57 +00:00
Brian Salomon
081e0e6a32 Move MIP color mode from GrSurfaceProxy to GrTextureProxy
Change-Id: I76bc7f551ea4052fc611cf01e0ce81102c9c3395
Reviewed-on: https://skia-review.googlesource.com/17263
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-05-18 14:38:03 +00:00
Greg Daniel
c96da1e51e Revert "Remove GrSurface::desc() method."
This reverts commit 9ac9953544.

Reason for revert: Lots of broken gold images

Original change's description:
> Remove GrSurface::desc() method.
> 
> Change-Id: If158dee90b3b0f80aa9c674180fbe6abd5b27d3f
> Reviewed-on: https://skia-review.googlesource.com/17268
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> 

TBR=bsalomon@google.com,robertphillips@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I5608c0e287e301aeac81dd3249a5c34d4603fcc6
Reviewed-on: https://skia-review.googlesource.com/17306
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-05-18 13:12:42 +00:00
Mike Klein
184593ca81 SkPath -> PreCachedPath
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>
2017-05-18 11:43:34 +00:00
Matt Sarett
e31d8a1484 SkColorSpace_ICC: classify two entry tables as linear
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>
2017-05-17 19:56:10 +00:00
Brian Salomon
9ac9953544 Remove GrSurface::desc() method.
Change-Id: If158dee90b3b0f80aa9c674180fbe6abd5b27d3f
Reviewed-on: https://skia-review.googlesource.com/17268
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-05-17 19:50:10 +00:00
Brian Osman
6e3ce40bd9 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.

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>
2017-05-17 19:45:10 +00:00