aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/shaders/SkPictureShader.h
Commit message (Collapse)AuthorAge
* rebaseGravatar Cary Clark2018-06-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 32a4910e57b1fdd3c8671de1ee85e05ca21d079f. Reason for revert: SkMatrix::toString use has been removed from flutter and has been picked up in fuchsia Additionally some bookmaker changes take into account recent additions of typedef comments and the generated header comment. Original change's description: > Revert "remove toString" > > This reverts commit 5191880cbf3ee4d122b0d11b4945fbab0784fda7. > > Reason for revert: broke flutter > > Original change's description: > > remove toString > > > > toString may have been used by obsolete debugger only > > find out if that is so > > > > R=​brianosman@google.com,bsalomon@google.com > > > > Docs-Preview: https://skia.org/?cl=119894 > > Bug:830651 > > Change-Id: I737f19b7d3fbc869bea2f443fa3b5ed7c1393ffd > > Reviewed-on: https://skia-review.googlesource.com/119894 > > Commit-Queue: Cary Clark <caryclark@google.com> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org > > Change-Id: I9f81de6c3615ee0608bcea9081b77239b4b8816c TBR=bsalomon@google.com,brianosman@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Reviewed-on: https://skia-review.googlesource.com/129623 Reviewed-by: Cary Clark <caryclark@skia.org> Commit-Queue: Cary Clark <caryclark@google.com> Docs-Preview: https://skia.org/?cl=133583 Bug: 830651 Change-Id: If8499e796be63580ad419e150e94d43e8b89de1b Reviewed-on: https://skia-review.googlesource.com/133583 Commit-Queue: Cary Clark <caryclark@skia.org> Auto-Submit: Cary Clark <caryclark@skia.org>
* Revert "Reland "remove toString""Gravatar Cary Clark2018-05-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 92e37b6d79f12ccfaaf7671413316952d182267d. Reason for revert: toString still used by flutter Original change's description: > Reland "remove toString" > > This reverts commit 32a4910e57b1fdd3c8671de1ee85e05ca21d079f. > > Reason for revert: SkMatrix::toString use has been removed from flutter and has been picked up in fuchsia > > Original change's description: > > Revert "remove toString" > > > > This reverts commit 5191880cbf3ee4d122b0d11b4945fbab0784fda7. > > > > Reason for revert: broke flutter > > > > Original change's description: > > > remove toString > > > > > > toString may have been used by obsolete debugger only > > > find out if that is so > > > > > > R=​brianosman@google.com,bsalomon@google.com > > > > > > Docs-Preview: https://skia.org/?cl=119894 > > > Bug:830651 > > > Change-Id: I737f19b7d3fbc869bea2f443fa3b5ed7c1393ffd > > > Reviewed-on: https://skia-review.googlesource.com/119894 > > > Commit-Queue: Cary Clark <caryclark@google.com> > > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > > > TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org > > > > Change-Id: I9f81de6c3615ee0608bcea9081b77239b4b8816c > > No-Presubmit: true > > No-Tree-Checks: true > > No-Try: true > > Bug: 830651 > > Reviewed-on: https://skia-review.googlesource.com/129340 > > Reviewed-by: Cary Clark <caryclark@google.com> > > Commit-Queue: Cary Clark <caryclark@google.com> > > TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org > > # Not skipping CQ checks because original CL landed > 1 day ago. > > Bug: 830651 > Change-Id: Ida8725b6051132d8c46faf99358a8fcc1bcabf34 > Reviewed-on: https://skia-review.googlesource.com/129623 > Reviewed-by: Cary Clark <caryclark@skia.org> > Reviewed-by: Cary Clark <caryclark@google.com> > Commit-Queue: Cary Clark <caryclark@google.com> TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org Change-Id: Iafc59ffc1b3db67c520ba31bf12d68e1b46c0ea2 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 830651 Reviewed-on: https://skia-review.googlesource.com/131082 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* Reland "remove toString"Gravatar Cary Clark2018-05-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 32a4910e57b1fdd3c8671de1ee85e05ca21d079f. Reason for revert: SkMatrix::toString use has been removed from flutter and has been picked up in fuchsia Original change's description: > Revert "remove toString" > > This reverts commit 5191880cbf3ee4d122b0d11b4945fbab0784fda7. > > Reason for revert: broke flutter > > Original change's description: > > remove toString > > > > toString may have been used by obsolete debugger only > > find out if that is so > > > > R=​brianosman@google.com,bsalomon@google.com > > > > Docs-Preview: https://skia.org/?cl=119894 > > Bug:830651 > > Change-Id: I737f19b7d3fbc869bea2f443fa3b5ed7c1393ffd > > Reviewed-on: https://skia-review.googlesource.com/119894 > > Commit-Queue: Cary Clark <caryclark@google.com> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org > > Change-Id: I9f81de6c3615ee0608bcea9081b77239b4b8816c > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: 830651 > Reviewed-on: https://skia-review.googlesource.com/129340 > Reviewed-by: Cary Clark <caryclark@google.com> > Commit-Queue: Cary Clark <caryclark@google.com> TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: 830651 Change-Id: Ida8725b6051132d8c46faf99358a8fcc1bcabf34 Reviewed-on: https://skia-review.googlesource.com/129623 Reviewed-by: Cary Clark <caryclark@skia.org> Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* Revert "remove toString"Gravatar Cary Clark2018-05-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 5191880cbf3ee4d122b0d11b4945fbab0784fda7. Reason for revert: broke flutter Original change's description: > remove toString > > toString may have been used by obsolete debugger only > find out if that is so > > R=​brianosman@google.com,bsalomon@google.com > > Docs-Preview: https://skia.org/?cl=119894 > Bug:830651 > Change-Id: I737f19b7d3fbc869bea2f443fa3b5ed7c1393ffd > Reviewed-on: https://skia-review.googlesource.com/119894 > Commit-Queue: Cary Clark <caryclark@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,brianosman@google.com,caryclark@google.com,caryclark@skia.org Change-Id: I9f81de6c3615ee0608bcea9081b77239b4b8816c No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 830651 Reviewed-on: https://skia-review.googlesource.com/129340 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* remove toStringGravatar Cary Clark2018-05-20
| | | | | | | | | | | | | | toString may have been used by obsolete debugger only find out if that is so R=brianosman@google.com,bsalomon@google.com Docs-Preview: https://skia.org/?cl=119894 Bug:830651 Change-Id: I737f19b7d3fbc869bea2f443fa3b5ed7c1393ffd Reviewed-on: https://skia-review.googlesource.com/119894 Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Fix use-of-uninitialized-value in SkPictureShader::onMakeContextGravatar Florin Malita2018-04-20
| | | | | | | | | | | | | | | | | | SkPictureShader::refBitmapShader is expected to always initialize the scale adjust vector when returning a non-null shader. But the code path returning EmptyShader does not do that. Instead of hauling around a separate scale adjustment, we can refactor to avoid this problem by adjusting the local matrix directly, if needed, in refBitmapShader. The local matrix is conveniently already stored in a SkTCopyOnFirstWrite. Bug: chromium:835048, oss-fuzz:7738 Change-Id: I2df3bde7d6237f01bc71857c2fe254e86b186dc0 Reviewed-on: https://skia-review.googlesource.com/122544 Auto-Submit: Florin Malita <fmalita@chromium.org> Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Reland "Fix handling of MaskFilter matrices"Gravatar Florin Malita2018-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c64ee20e135a336ed775ccb6dec8a87efd19ec02. Reason for revert: initial failures should be fixed in https://skia.googlesource.com/skia.git/+/8eaf64ae12696d4189d3cea9f023658494cf82b8 Original change's description: > Revert "Fix handling of MaskFilter matrices" > > This reverts commit 2097fd03ffea48bd904c48c93348b2350600870e. > > Reason for revert: This is breaking a lot of Windows bots (esp. on the shadermaskfilter_localmatrix) > > Original change's description: > > Fix handling of MaskFilter matrices > > > > 1) extend GrFPArgs to track pre/post local matrices, add helpers for > > creating pre/post wrapper args > > > > 2) add a SkShaderBase helper (totalLocalMatrix) to centralize the LM > > sandwich logic. > > > > 3) update call sites to use the above > > > > 4) rename SkMatrixFilter::makeWithLocalMatrix -> makeWithMatrix, to > > disambiguate vs. SkShader::makeWithLocalMatrix. > > > > BUG=skia:7744 > > > > Change-Id: Ib2b7b007e6924979b00649dde7c94ef4b34771f1 > > Reviewed-on: https://skia-review.googlesource.com/119330 > > Commit-Queue: Florin Malita <fmalita@chromium.org> > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > TBR=bsalomon@google.com,robertphillips@google.com,fmalita@chromium.org,reed@google.com > > Change-Id: I918dbb95bf00b3122e6699b84566ec82dbb5fc5c > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia:7744 > Reviewed-on: https://skia-review.googlesource.com/120340 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> TBR=bsalomon@google.com,robertphillips@google.com,fmalita@chromium.org,reed@google.com Change-Id: If194862a928d1abe22ed8fa968436c725d19a8fc No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7744 Reviewed-on: https://skia-review.googlesource.com/120480 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Florin Malita <fmalita@chromium.org>
* Revert "Fix handling of MaskFilter matrices"Gravatar Robert Phillips2018-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2097fd03ffea48bd904c48c93348b2350600870e. Reason for revert: This is breaking a lot of Windows bots (esp. on the shadermaskfilter_localmatrix) Original change's description: > Fix handling of MaskFilter matrices > > 1) extend GrFPArgs to track pre/post local matrices, add helpers for > creating pre/post wrapper args > > 2) add a SkShaderBase helper (totalLocalMatrix) to centralize the LM > sandwich logic. > > 3) update call sites to use the above > > 4) rename SkMatrixFilter::makeWithLocalMatrix -> makeWithMatrix, to > disambiguate vs. SkShader::makeWithLocalMatrix. > > BUG=skia:7744 > > Change-Id: Ib2b7b007e6924979b00649dde7c94ef4b34771f1 > Reviewed-on: https://skia-review.googlesource.com/119330 > Commit-Queue: Florin Malita <fmalita@chromium.org> > Reviewed-by: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,robertphillips@google.com,fmalita@chromium.org,reed@google.com Change-Id: I918dbb95bf00b3122e6699b84566ec82dbb5fc5c No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7744 Reviewed-on: https://skia-review.googlesource.com/120340 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Fix handling of MaskFilter matricesGravatar Florin Malita2018-04-11
| | | | | | | | | | | | | | | | | | | | 1) extend GrFPArgs to track pre/post local matrices, add helpers for creating pre/post wrapper args 2) add a SkShaderBase helper (totalLocalMatrix) to centralize the LM sandwich logic. 3) update call sites to use the above 4) rename SkMatrixFilter::makeWithLocalMatrix -> makeWithMatrix, to disambiguate vs. SkShader::makeWithLocalMatrix. BUG=skia:7744 Change-Id: Ib2b7b007e6924979b00649dde7c94ef4b34771f1 Reviewed-on: https://skia-review.googlesource.com/119330 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com>
* remove SK_IGNORE_TO_STRINGGravatar Cary Clark2018-04-05
| | | | | | | | | | | | | | | | | | | SK_IGNORE_TO_STRING is not defined anywhere. The same effect can be had by using a modern linker. Removing it simplifies bookmaker and makes our includes easier to understand. R=robertphillips@google.com TBR=reed@google.com Bug: skia:6898 Change-Id: Ib716f5ef1b42a7fbda0df43ece212d1b7c40289f Reviewed-on: https://skia-review.googlesource.com/118963 Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Cary Clark <caryclark@skia.org> Commit-Queue: Cary Clark <caryclark@skia.org>
* Banish SkShaderBase::isRasterPipelineOnly()Gravatar Florin Malita2018-04-04
| | | | | | | | | | | | | | | | | Keeping related heuristics in sync with actual shader capabilities is somewhat tricky, and overall fragile. So how about this: instead of an explicit opt-in mechanism, try to instantiate a legacy shader context and fall back to raster pipeline on failure (null Context => implicit opt-in for raster pipeline). Shaders can still choose not to draw by returning both a null Context and failing appendStages(). BUG=skia:7772 Change-Id: I2e76f51af7064853a6cb851b4c30c82eba3ee828 Reviewed-on: https://skia-review.googlesource.com/118383 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Reed <reed@google.com>
* Fix picture shader handling of outer local matrixGravatar Florin Malita2018-02-06
| | | | | | | | | | | Instead of applying local matrices to the cached shader, pass them explicitly/composed to createContext/appendStages/asFragmentProcessor. Change-Id: I39aaf07ac883094c447c4e03e2ef9dcf8de13555 Reviewed-on: https://skia-review.googlesource.com/104580 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Reed <reed@google.com>
* rename inner AsFPArgs to stand-alone GrFPArgsGravatar Mike Reed2018-01-19
| | | | | | | | | | This prepares us to share this with other effects (most notably maskfilters) Bug: skia: Change-Id: I12530fdf10c4e5f2a9ab6d394bf9e87c54ea60c4 Reviewed-on: https://skia-review.googlesource.com/97062 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* fold params into StageRecGravatar Mike Reed2017-08-29
| | | | | | | | | | | | | pre-CL before trying to add a hint-rect field to allow shaders to "optimize" their stages for a given restriction in device space - e.g. if the shader's intrinsic domain is contained, it won't need to tile/clamp Bug: skia: Change-Id: Ia2da557691da25f31e4b9e3f53c3bc6709b89083 Reviewed-on: https://skia-review.googlesource.com/40224 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Make GrFragmentProcessor be non-refcounted and use std::unique_ptr.Gravatar Brian Salomon2017-08-11
| | | | | | | Change-Id: I985e54a071338e99292a5aa2f42c92bc115b4008 Reviewed-on: https://skia-review.googlesource.com/32760 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* use rasterpipeline for images if matrix is >= scale+translateGravatar Mike Reed2017-08-08
| | | | | | | | | Bug: skia: Change-Id: I36112fe54c6f2d0965d0b88f0291d7ffe0902715 Reviewed-on: https://skia-review.googlesource.com/30480 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Florin Malita <fmalita@chromium.org>
* simplify shaderbase -- remove shaderproc -- no measurable speed diffGravatar Mike Reed2017-08-07
| | | | | | | | Bug: skia: Change-Id: Id355e3e480847fe78f904735e59353c4eb3ba2bb Reviewed-on: https://skia-review.googlesource.com/31560 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Purge cached SkPictureShader entries on shader deletionGravatar Florin Malita2017-07-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're currently adding picture shader cache entries to the resource cache, but we don't ever purge. To avoid exhausting the budget, add logic to associate cached entries with their owning picture shader, and purge when the shader is deleted. -- Side note -- The current cache key is K(pictureID, ...) so technically the cache entries are associated with the picture, not the shader. One could resonably argue we should only purge when the *picture* is deleted. Unfortunately, this doesn't work: the cache entries contain indirect refs to the picture (SkImageShader -> SkImage_Generated -> SkPictureImageGenerator -> SkPicture), so the picture is always kept alive. Associating the cache entries with the shader itself seems like a reasonable alternative, even if we give up some cache persistence in the process. Change-Id: Ia115dbb5ae627e5ee171da7c4430fecfd42f4292 Reviewed-on: https://skia-review.googlesource.com/23380 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Add some raster pipeline perspective assertsGravatar Florin Malita2017-07-12
| | | | | | | | | | | | | | | | | | | | | I meant to add these when removing the guard, but since we landed without a guard, might as well do it now. A couple of things exposed by these asserts: 1) we need to also catch perspective in local matrices 2) we need to disallow burst mode with perspective Also tweak the predicate to hasPerspective() instead of explicit mask check. Change-Id: I099e5125fca52dccffca77c60fc800bbdf539b53 Reviewed-on: https://skia-review.googlesource.com/22483 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Revert[2] "use rasterpipeline for non-8888-clamp shaders (so we can delete ↵Gravatar Mike Reed2017-06-22
| | | | | | | | | | | | | | | more legacy code)"" Now with guard for Chrome and fix for bench https://codereview.chromium.org/2947233002/ This reverts commit 19d0b99922712df3f07ba4622f1e5ccddc3b7168. Bug: skia: Change-Id: I5991955d0d927d34a184cf4d9844b0d565e03b88 Reviewed-on: https://skia-review.googlesource.com/20461 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "use rasterpipeline for non-8888-clamp shaders (so we can delete more ↵Gravatar Mike Reed2017-06-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | legacy code)" This reverts commit 00b8ab61ddf6723a593bfcc931bbabb957aa7b19. Reason for revert: breaks nanobench Original change's description: > use rasterpipeline for non-8888-clamp shaders (so we can delete more legacy code) > > Definitely changes some GMs, but I think they're all more correct. > > Bug: skia: > Change-Id: Ic30622f2c17325bce4c82b4d7997036d3cc026c2 > Reviewed-on: https://skia-review.googlesource.com/20363 > Reviewed-by: Florin Malita <fmalita@chromium.org> > Reviewed-by: Mike Klein <mtklein@google.com> > Commit-Queue: Mike Reed <reed@google.com> TBR=mtklein@google.com,herb@google.com,fmalita@chromium.org,reed@google.com Change-Id: I6b7e8d68deb8b62bd9688c95a5937a0bba8b4cf5 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/20431 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* use rasterpipeline for non-8888-clamp shaders (so we can delete more legacy ↵Gravatar Mike Reed2017-06-21
| | | | | | | | | | | | | code) Definitely changes some GMs, but I think they're all more correct. Bug: skia: Change-Id: Ic30622f2c17325bce4c82b4d7997036d3cc026c2 Reviewed-on: https://skia-review.googlesource.com/20363 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Reed <reed@google.com>
* [Reland] Relocate shaders to own dirGravatar Florin Malita2017-05-30
| | | | | | | | | | | Consolidate all shader impls under src/shaders/. (reland of https://skia-review.googlesource.com/c/17927/) Change-Id: I7918bdc1aafe842ed194412ba95b9ae53a2ec1d7 Reviewed-on: https://skia-review.googlesource.com/18146 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Revert "Relocate shaders to own dir"Gravatar Stan Iliev2017-05-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit fabe0b26d05624ce7374f6ca89bd66df6142534e. Reason for revert: Last android roll failed with "external/skia/src/effects/SkGaussianEdgeShader.h:11:10: fatal error: 'SkShaderBase.h' file not found" Original change's description: > Relocate shaders to own dir > > Consolidate all shader impls under src/shaders/. > > Change-Id: I450e37541214704c1ad9e379d9d753b7cc62fac3 > Reviewed-on: https://skia-review.googlesource.com/17927 > Commit-Queue: Florin Malita <fmalita@chromium.org> > Reviewed-by: Herb Derby <herb@google.com> > TBR=mtklein@google.com,herb@google.com,fmalita@chromium.org,reed@google.com No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: Idbb2b75053969df1dad9d8ce0217cd39189b9ddb Reviewed-on: https://skia-review.googlesource.com/18020 Reviewed-by: Stan Iliev <stani@google.com> Commit-Queue: Stan Iliev <stani@google.com>
* Relocate shaders to own dirGravatar Florin Malita2017-05-25
Consolidate all shader impls under src/shaders/. Change-Id: I450e37541214704c1ad9e379d9d753b7cc62fac3 Reviewed-on: https://skia-review.googlesource.com/17927 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Herb Derby <herb@google.com>