aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrXferProcessor.cpp
Commit message (Collapse)AuthorAge
* Use shader based blending to clamp kPlus mode w/F16Gravatar Brian Osman2017-09-20
| | | | | | | | Bug: skia:6173 Change-Id: I21042d484d9a7b3eee04aa3301d9793d00ad6908 Reviewed-on: https://skia-review.googlesource.com/48183 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Fix gpu lcd blending to semi-correctly handle alpha coverageGravatar Greg Daniel2017-05-19
| | | | | | | | 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>
* Move ref counting out of GrProcessor and into subclasses.Gravatar Brian Salomon2017-04-10
| | | | | | | | | | | | | This will allow different subclasses to use different models for lifetime management. GrXferProcessor moves to simple ref counting since they don't own GrGpuResources. This also constifies GrXferProcessor factories. Change-Id: I6bea0ea8de718874063224232f9da50887868b16 Reviewed-on: https://skia-review.googlesource.com/11792 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Use sk_sp with GrXferProcessor and use a static factory to handle the ↵Gravatar Brian Salomon2017-04-04
| | | | | | | | | | nullptr==srcover case. Bug: skia: Change-Id: I9c07069fc2aae24fc2884c18939e3a649afc27e7 Reviewed-on: https://skia-review.googlesource.com/11282 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Store the dst texture used by an XP in GrPipeline rather than in the XP.Gravatar Brian Salomon2017-04-03
| | | | | | | | | This will allow the XP to be created before the dst texture. Change-Id: I3e5bdfa8e5d47e58a3560792ce5cf3899d30a024 Reviewed-on: https://skia-review.googlesource.com/11011 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Respect xfer barriers in InstancedRendering::OpGravatar Brian Salomon2017-03-31
| | | | | | | | | Fixes a bug introduced when this Op stopped storing a GrPipeline. Change-Id: I1a39814cebe18b321ea369f005bb7759f233cfe6 Reviewed-on: https://skia-review.googlesource.com/10804 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Renames of processor analysis-related classes and method.Gravatar Brian Salomon2017-03-30
| | | | | | | | | | | | GrProcesserSet::FragmentProcessorAnalysis->GrProcessorSet::Analysis GrPipelineAnalysisColor->GrProcessorAnalysisColor GrPipelineAnalysisCoverage->GrProcessorAnalysisCoverage GrMeshDrawOp::getFragmentProcessorAnalysisInputs->GrMeshDrawOp::getProcessorAnalysisInputs Change-Id: I28ad19dfab5f4ac1788c4eacdec5e1af2a701dd0 Reviewed-on: https://skia-review.googlesource.com/10747 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Make analysis optional to GrPipeline::init().Gravatar Brian Salomon2017-03-29
| | | | | | | | | | | GrXPFactory::createXferProcessor now takes GrPipelineAnalysisColor and GrPipelineAnalysisCoverage rather than GrProcessorSet::FragmentProcessorAnalysis. This will make it so ops do not have to retain the analysis or rerun it to create pipelines at flush time. Change-Id: Ib28ba65de425b20c2647329275f209aec168c3df Reviewed-on: https://skia-review.googlesource.com/10474 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Miscellaneous GrSurfaceProxy-related cleanupGravatar Robert Phillips2017-03-29
| | | | | | | | | This is pulled out of: https://skia-review.googlesource.com/c/10284/ (Remove GrSurface-derived classes from ops) Change-Id: I083c0beefe4899b3517d0b0569bb25096809f410 Reviewed-on: https://skia-review.googlesource.com/10483 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Remove GrXferProcessor::getOptimizations.Gravatar Brian Salomon2017-03-29
| | | | | | | | | | This replaces GrXferProcessor::getOptimizations with a new function on GrXPFactory. The results are made available via FragmentProcessorAnalysis. Bug: skia: Change-Id: I535985458c9d13ad858cac94e957e2fdbe332036 Reviewed-on: https://skia-review.googlesource.com/10218 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Split GrPipelineInput into separate color and coverage types, the latter of ↵Gravatar Brian Salomon2017-03-27
| | | | | | | | | | | | | | | which is just an enum. Assign names that indicate that they aren't just for the input phase since I plan to use them at the boundary between FPs and XPs as well. Renamed GrProcOptInfo to GrColorFragmentProcessorAnalysis. This is now only used on the color side and the new name seems clearer to me. Change GrMeshDrawOp::getFragmentProcessorAnalysisInputs to use the new color/coverage types directly rather than a class that has been reduced to simply bundling them together. Change-Id: If93bae74c9d590486eecdf63f302418c96deab65 Reviewed-on: https://skia-review.googlesource.com/10161 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "Revert "Remove GrPipeline from GrDrawOp.""Gravatar Brian Salomon2017-03-21
| | | | | | | | | This reverts commit c48af934608bbb65650641f66adb51f2102d4274. Change-Id: I4ba78fd7e5a7d406b88223ca6f7245c029b60f76 Reviewed-on: https://skia-review.googlesource.com/9981 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Remove GrPipeline from GrDrawOp."Gravatar Brian Salomon2017-03-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2bf4b3a97b770811d9e0558dbbfbdb57cfafbdb7. Reason for revert: nanobench assertion Original change's description: > Remove GrPipeline from GrDrawOp. > > GrDrawOp subclasses are now free to construct their pipelines at flush time and now in theory could use multiple GrPipelines for multipass rendering. > > GrProcessorSet may be used to retain the processors from a GrPaint with "pending execution" style refs. > > NVPR and Instanced rendering are updated to create their pipelines at flush time without a GrPipelineBuilder. > > The monolithic pipeline creation/management that was on GrDrawOp is moved to GrMeshDrawOp. However, this is temporary and will be removed in coming changes. > > Change-Id: I124282e3cea5d070970b5460c8a679fcaf7a8eff > Reviewed-on: https://skia-review.googlesource.com/7279 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,csmartdalton@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I1bc64f6cbbd5f482417637a034342c2b5371dc5c Reviewed-on: https://skia-review.googlesource.com/9817 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Remove GrPipeline from GrDrawOp.Gravatar Brian Salomon2017-03-16
| | | | | | | | | | | | | | | GrDrawOp subclasses are now free to construct their pipelines at flush time and now in theory could use multiple GrPipelines for multipass rendering. GrProcessorSet may be used to retain the processors from a GrPaint with "pending execution" style refs. NVPR and Instanced rendering are updated to create their pipelines at flush time without a GrPipelineBuilder. The monolithic pipeline creation/management that was on GrDrawOp is moved to GrMeshDrawOp. However, this is temporary and will be removed in coming changes. Change-Id: I124282e3cea5d070970b5460c8a679fcaf7a8eff Reviewed-on: https://skia-review.googlesource.com/7279 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Add query to GrXPFactory about coverage-as-alpha optimizationGravatar Brian Salomon2017-03-13
| | | | | | | | | This will be needed to have GrDrawOps that haven't yet built pipelines. Change-Id: If5292aaa5dc9f98dccbe27be98960b630332158d Reviewed-on: https://skia-review.googlesource.com/9480 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Remove PLS path rendererGravatar Brian Salomon2017-03-06
| | | | | | | Change-Id: Ib727b0749a5a7da95832970e79804417e8b6a247 Reviewed-on: https://skia-review.googlesource.com/9300 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Remove XP override color.Gravatar Brian Salomon2017-03-06
| | | | | | | | | | | The only use case for this was using the blend constant for LCD text. Now instead of overriding the op's color with an alpha we upload the alpha as a uniform. This also removes two unused parameters from GrXferProcessor::getOptimizations. Change-Id: I8268da9904a5d26649c6ae81a5705b0930893904 Reviewed-on: https://skia-review.googlesource.com/9221 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Make GrPipelineAnalysis a nested class of GrProcessorSet.Gravatar Brian Salomon2017-02-22
| | | | | | | | | | | | | | | | It is renamed to FragmentProcessorAnalysis since it represents the outputs of the final FPs. It now stores the analysis results that are subsequently needed rather than exposing GrProcOptInfo. GrProcOptInfo is now only used on color FPs (not coverage). Miscellaneous related renamings. Change-Id: I95c518a7a76df6dc294a9fa67c611f8f653247bc Reviewed-on: https://skia-review.googlesource.com/8534 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Simplify GrPaint::isConstantBlendedColor to avoid FP analysis and XP virtual ↵Gravatar Brian Salomon2017-02-21
| | | | | | | | | | | calls This was the only non-test user of GrXPFactory::isConstantPreCoverageBlendedColor which is now removed. Change-Id: Ic1c130d30a44e1a955b89f8912433a3c9df2e61e Reviewed-on: https://skia-review.googlesource.com/8776 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Remove component flags from GrXPFactory output analysis.Gravatar Brian Salomon2017-02-14
| | | | | | | Change-Id: Ieb8dab564e6e593dca2e092d352756052dadfd90 Reviewed-on: https://skia-review.googlesource.com/8354 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Replaced all calls to fragmentPosition() with sk_FragCoordGravatar Ethan Nicholas2017-02-13
| | | | | | | Change-Id: I2ed4558aea74b3ae7ee11dfe4736cdbcb16ae49e Reviewed-on: https://skia-review.googlesource.com/8278 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Use new fragment processor optimization queries.Gravatar Brian Salomon2017-02-10
| | | | | | | | | | | This doesn't yet delete the old virtuals. It still uses the color and component flags model for the pipeline input and blended output but I'm planning to change those as well. Change-Id: I64e2ec0fe9ed9fae3aabf1ca8c9bc0582fc7565a Reviewed-on: https://skia-review.googlesource.com/7760 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Revert "Replaced all calls to fragmentPosition() with sk_FragCoord"Gravatar Ethan Nicholas2017-02-02
| | | | | | | | | | | | | This reverts commit de4d301881e7fd084f1f0b359ec6f9b2bf8bd4c5. Reason for revert: several Chrome rendering bugs on Mac BUG=skia: Change-Id: I492082b0b7e7c902ede4b598c5809f604d210ce1 Reviewed-on: https://skia-review.googlesource.com/7887 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
* Revert "Revert "Make it possible to query GrXPFactory for dst texture ↵Gravatar Brian Salomon2017-01-20
| | | | | | | | | | | | | without GrPipelineAnalysis."" This reverts commit 3329cceab5feca230df1caee16be045249228dc1. Reason for revert: Bot failures are unrelated to the original change. Change-Id: I21b5927dc4384a25930bdefe16e57bcc9276ffa4 Reviewed-on: https://skia-review.googlesource.com/7347 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "Make it possible to query GrXPFactory for dst texture without ↵Gravatar Brian Salomon2017-01-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | GrPipelineAnalysis." This reverts commit f833215420847565b4c9945aebdc2e7ae182937f. Reason for revert: <INSERT REASONING HERE> Original change's description: > Make it possible to query GrXPFactory for dst texture without GrPipelineAnalysis. > > Change-Id: I8c140eb4e3e5f2d21ecbf8f8f3c8533dc7f50e7c > Reviewed-on: https://skia-review.googlesource.com/7316 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> > TBR=egdaniel@google.com,bsalomon@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I790afb9a01422cb4c2d3a4be4ecd20e8c4466b29 Reviewed-on: https://skia-review.googlesource.com/7342 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Make it possible to query GrXPFactory for dst texture without ↵Gravatar Brian Salomon2017-01-20
| | | | | | | | | GrPipelineAnalysis. Change-Id: I8c140eb4e3e5f2d21ecbf8f8f3c8533dc7f50e7c Reviewed-on: https://skia-review.googlesource.com/7316 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Replaced all calls to fragmentPosition() with sk_FragCoordGravatar Ethan Nicholas2017-01-19
| | | | | | | | | BUG=skia: Change-Id: I179576e148ea6caf6e1c40f0a216421898bcb35d Reviewed-on: https://skia-review.googlesource.com/5941 Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Removing tracking of whether GP/FP coverage calculations are used by XP.Gravatar Brian Salomon2017-01-04
| | | | | | | | | | | | | | | Remove readsCoverage from GrPipelineOptimizations Remove kNone from GrDefaultGeoProc::Coverage Remove kIgnoreCoverage from GrXferProcessor::OptFlags Remove GrPipeline::fIgnoresCoverage Change-Id: I8f0c9337ee98b9c77af1e9a8a184519ce63822d4 Reviewed-on: https://skia-review.googlesource.com/6552 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* This renames methods and classes that relate to static analysis of ↵Gravatar Brian Salomon2016-12-21
| | | | | | | | | combinations of GrDrawOps and GrPipelines. Change-Id: I737b901a19d3c67d2ff7f95802fb4df35656beb2 Reviewed-on: https://skia-review.googlesource.com/6199 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Merge GrGLSLCaps into GrShaderCapsGravatar Brian Salomon2016-11-29
| | | | | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5121 Change-Id: If8d13638f80f42161cbc766a2666c5789e5772c8 Reviewed-on: https://skia-review.googlesource.com/5121 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Rename GrTextureAccess to GrProcessor::TextureSampler.Gravatar Brian Salomon2016-11-17
| | | | | | | | | | | Renames vars and methods that used the work "access" to refer to this type. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4931 Change-Id: Ibcf488fbd445c5119fc13d190544cd98981bdbee Reviewed-on: https://skia-review.googlesource.com/4931 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Move GrPipelineBuilder out of gms & reduce use of GrPipelineBuilder.hGravatar robertphillips2016-06-23
| | | | | | | | Just another step in reining in the GrPLB GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2086293006 Review-Url: https://codereview.chromium.org/2086293006
* Remove hasMixedSamples() from GrPipelineBuilderGravatar cdalton2016-05-06
| | | | | | | | | | This info is unknown until after any clip has been applied to the stencil settings, so it's misleading to include in the builder. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1952323002 Review-Url: https://codereview.chromium.org/1952323002
* Style bikeshed - remove extraneous whitespaceGravatar halcanary2016-03-29
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1842753002 Review URL: https://codereview.chromium.org/1842753002
* added support for PLS path renderingGravatar ethannicholas2016-01-30
| | | | | | | | | BUG=skia:3555 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1541903002 Committed: https://skia.googlesource.com/skia/+/7df3f5e127f8016d17b637cc48a6a4718f1a6822 Review URL: https://codereview.chromium.org/1541903002
* Revert of added support for PLS path rendering (patchset #16 id:360001 of ↵Gravatar ethannicholas2016-01-22
| | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1541903002/ ) Reason for revert: ASAN failure at src/gpu/GrXferProcessor.cpp:224 Original issue's description: > added support for PLS path rendering > > BUG=skia:3555 > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1541903002 > > Committed: https://skia.googlesource.com/skia/+/7df3f5e127f8016d17b637cc48a6a4718f1a6822 TBR=bsalomon@google.com,egdaniel@google.com,joshualitt@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:3555 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1626553002 Review URL: https://codereview.chromium.org/1626553002
* added support for PLS path renderingGravatar ethannicholas2016-01-22
| | | | | | | BUG=skia:3555 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1541903002 Review URL: https://codereview.chromium.org/1541903002
* Create a static instances of SrcOver XferProcessorGravatar egdaniel2015-11-30
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1471293003
* APIs which took colorPOI / coveragePOI pairs updated to take a ↵Gravatar ethannicholas2015-11-30
| | | | | | | | GrPipelineOptimizations struct TBR=bsalomon@google.com Review URL: https://codereview.chromium.org/1480353002
* Rename some processor functions from GL to GLSLGravatar egdaniel2015-11-13
| | | | | | | | TBR=bsalomon@google.com BUG=skia: Review URL: https://codereview.chromium.org/1443743002
* Check for xfer barriers in GrBatch, auto-issue barriers in GrGpuGravatar bsalomon2015-08-12
| | | | Review URL: https://codereview.chromium.org/1287973003
* Add mixed samples support to XPsGravatar cdalton2015-06-08
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1164973002
* Fix regression in GrXferProcessorGravatar cdalton2015-06-08
| | | | | | | | Fix segfault introduced in https://codereview.chromium.org/1170553002/ BUG=skia: Review URL: https://codereview.chromium.org/1167243002
* Apply coverage in XP base class when using dst readsGravatar cdalton2015-06-08
| | | | | | | | | | Moves the coverage logic into GrGLXferProcessor for XPs that perform dst reads. XPs that don't use a dst read are still responsible to handle coverage on their own. BUG=skia: Review URL: https://codereview.chromium.org/1170553002
* Move DstCoordTexture to GrXP, rename and remove the word "copy" from ↵Gravatar bsalomon2015-05-26
| | | | | | | | dstcopytexture names. Committed: https://skia.googlesource.com/skia/+/bb106b5f6ee18f7453b63f3a95f421b60a957f39 Review URL: https://codereview.chromium.org/1132093004
* Revert of Move DstCoordTexture to GrXP, rename and remove the word "copy" ↵Gravatar bungeman2015-05-22
| | | | | | | | | | | | | | | | | | | | | | | | | from dstcopytexture names. (patchset #6 id:100001 of https://codereview.chromium.org/1132093004/) Reason for revert: This is asserting on GTX660 bots with '!dst'. This may just be catching an existing issue. https://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-ShuttleA-GPU-GTX660-x86_64-Debug/builds/622/steps/dm/logs/stdio https://build.chromium.org/p/client.skia/builders/Test-Win7-MSVC-ShuttleA-GPU-HD2000-x86-Debug-ANGLE/builds/209/steps/dm/logs/stdio https://build.chromium.org/p/client.skia/builders/Test-Win8-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug/builds/318/steps/dm/logs/stdio Original issue's description: > Move DstCoordTexture to GrXP, rename and remove the word "copy" from dstcopytexture names. > > Committed: https://skia.googlesource.com/skia/+/bb106b5f6ee18f7453b63f3a95f421b60a957f39 TBR=egdaniel@google.com,bsalomon@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1158453004
* Move DstCoordTexture to GrXP, rename and remove the word "copy" from ↵Gravatar bsalomon2015-05-22
| | | | | | dstcopytexture names. Review URL: https://codereview.chromium.org/1132093004
* rename GrDrawTargetCaps to GrCapsGravatar bsalomon2015-05-19
| | | | Review URL: https://codereview.chromium.org/1133123009
* Add function for logging blend info on XP.Gravatar bsalomon2015-05-11
| | | | Review URL: https://codereview.chromium.org/1132373003
* Only discard for XP dstCopies if we have a coverage value.Gravatar egdaniel2015-05-10
| | | | | | | | TBR=bsalomon@google.com BUG=skia: Review URL: https://codereview.chromium.org/1125283005