aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrShape.cpp
Commit message (Collapse)AuthorAge
* Stop using SkTSwap.Gravatar Ben Wagner2018-06-19
| | | | | | | | | | | | | Use std::swap instead. It does not appear that any external user specializes SkTSwap, but some may still use it. This removes all use in Skia so that SkTSwap can later be removed in a smaller CL. After that the <utility> include can be removed from SkTypes.h. Change-Id: If03d4ee07dbecda961aa9f0dc34d171ef5168753 Reviewed-on: https://skia-review.googlesource.com/135578 Reviewed-by: Hal Canary <halcanary@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Make the SkPathRef GenIDChangeListener ref countedGravatar Chris Dalton2018-06-08
| | | | | | | | Bug: skia: Change-Id: I2780e3fc76153373b4efca6059ded82f4f749325 Reviewed-on: https://skia-review.googlesource.com/133502 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Remove unused SK_DISABLE_ARC_TO_LINE_TO_CHECK build flagGravatar Brian Salomon2018-05-04
| | | | | | | Change-Id: Ibcdb8c53a95a135a8686b3fe22df5a9d32e939c7 Reviewed-on: https://skia-review.googlesource.com/126060 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Reland "Revert "Add arcs as a specialized geometry to GrShape."""Gravatar Brian Salomon2018-04-26
| | | | | | | | | | This reverts commit 580aee2fa4a57bf8208498fbc23acea04e16e092. Bug: skia:7794 Change-Id: I9c2b923859c826dff58c22c529dc4e2ab4d0f186 Reviewed-on: https://skia-review.googlesource.com/124042 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Reland "Revert "Add arcs as a specialized geometry to GrShape.""Gravatar Brian Salomon2018-04-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8a98bc96748d1bdaf9c2d8cfa0b672e3a035973d. Reason for revert: <INSERT REASONING HERE> Original change's description: > Revert "Revert "Add arcs as a specialized geometry to GrShape."" > > This reverts commit af88ec37124846a0168a4ab061bf10cc6030c2d6. > > Bug: skia:7794 > Change-Id: I2d0e1d7b4e025481241d823b09f5de5d0f1a13eb > Reviewed-on: https://skia-review.googlesource.com/123627 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,robertphillips@google.com Change-Id: Ib09a533600028b76a69b455c952f3dd12b39bdba No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7794 Reviewed-on: https://skia-review.googlesource.com/123780 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Revert "Add arcs as a specialized geometry to GrShape.""Gravatar Brian Salomon2018-04-25
| | | | | | | | | | This reverts commit af88ec37124846a0168a4ab061bf10cc6030c2d6. Bug: skia:7794 Change-Id: I2d0e1d7b4e025481241d823b09f5de5d0f1a13eb Reviewed-on: https://skia-review.googlesource.com/123627 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Add arcs as a specialized geometry to GrShape."Gravatar Mike Klein2018-04-24
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 255bcf57ffd9db368cd66ca9697549efd799153e. Reason for revert: layout and scuba image diffs Original change's description: > Add arcs as a specialized geometry to GrShape. > > BUG: skia:7794 > > Change-Id: I484693711f48e55631732a0f4ee97e2848dec89d > Reviewed-on: https://skia-review.googlesource.com/122900 > Commit-Queue: Brian Salomon <bsalomon@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> TBR=bsalomon@google.com,robertphillips@google.com Change-Id: I9293b8fbb535d940bca5fc30a95908416b9eb7a7 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/123362 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Add arcs as a specialized geometry to GrShape.Gravatar Brian Salomon2018-04-23
| | | | | | | | | BUG: skia:7794 Change-Id: I484693711f48e55631732a0f4ee97e2848dec89d Reviewed-on: https://skia-review.googlesource.com/122900 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* hide complex versions of isOval and isRRectGravatar Mike Reed2018-02-20
| | | | | | | | Bug: skia: Change-Id: I9fa899d409470f424fdfbef5b0c3bb528bcce40e Reviewed-on: https://skia-review.googlesource.com/108660 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Make GrShape lazily initialize an original path for gen id change listenersGravatar Brian Salomon2018-01-03
| | | | | | | Change-Id: I3a1cb400190cf18241436b7e655a4a267bb2e22d Reviewed-on: https://skia-review.googlesource.com/90482 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Make GrShape recognize horizontal/vertical dashed lines with 0 off intervals ↵Gravatar Brian Salomon2017-12-21
| | | | | | | | | as rrects. Change-Id: Ic29b41911e0185d36093d5352f4494709e8124ba Reviewed-on: https://skia-review.googlesource.com/88428 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Make GrRenderTargetContext::drawPath() use GrShape to identify simplerGravatar Brian Salomon2017-12-20
| | | | | | | | | geometries. Change-Id: I24230efc8bcb60f00c0c855090e3311ad13d7da8 Reviewed-on: https://skia-review.googlesource.com/85962 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Don't canonicalize empty SkRRects. They stroke differently.Gravatar Brian Salomon2017-12-19
| | | | | | | | | | | | Make insetting greater than width or height collapse to a point/line. SkPath::addRRect() doesn't ignore an empty SkRRect. Change-Id: I933a3419a6d75be534f1d8328faa715772045f67 Reviewed-on: https://skia-review.googlesource.com/85680 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Sever fOriginalPath connection whenever a GrShape becomes a simple typeGravatar Brian Osman2017-10-04
| | | | | | | | | | | | | | When drawing a round-rect, for example, we may end up in drawPath with a temporary path that was created with the rrect added. We ended up putting a genID listener on that (stack allocated) path, so we would evict cache entries immediately. This restores the old behavior, where cache entries for paths derived from simple types are never invalidated. Bug: skia:7087 Change-Id: I3eed9c3a289241bfe1e42036be3362f592256693 Reviewed-on: https://skia-review.googlesource.com/54460 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Invalidate path VBs when paths are destroyedGravatar Brian Osman2017-09-26
| | | | | | | | | | | | | | | | | | | For this to work, we need access to the "original" path, before any style was applied. To that end, add an original path to GrShape (and unit tests of that functionality). Then add a version of addGenIDChangeListener to GrShape, that propagates to the original path, and use that in tessellating path renderer. Includes unit tests of caching behavior in the PR, all of which failed without this change. Bug: skia: Change-Id: I98bb505f521e8ff07184f5c3fbd3c5fd1a22d3d5 Reviewed-on: https://skia-review.googlesource.com/50300 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Remove invalid SkRRect asserts in GrShapeGravatar Brian Osman2017-09-14
| | | | | | | | | | | Due to floating point math, it's possible to add a round-rect to a path, then pull it back out and have the type change. Bug: skia:7037 Change-Id: I071b77378da08b873ff9d68fdac2373370faa71c Reviewed-on: https://skia-review.googlesource.com/46585 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Add methods for converting GrShape to filled styleGravatar Brian Salomon2017-09-01
| | | | | | | | Bug: skia: Change-Id: I6726428d1358909972adec8d63686b637ef5bb5e Reviewed-on: https://skia-review.googlesource.com/40222 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Revert "Add a GrShape::Type value for an inverted empty path""Gravatar Brian Salomon2017-08-31
| | | | | | | | | | This reverts commit 07f5b71f996ec387408ac7c85952b63bf893ec88. Bug: skia: Change-Id: I14cc34ab563028a4a24de2112575ab4516f1c7c7 Reviewed-on: https://skia-review.googlesource.com/41441 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Revert "Add a GrShape::Type value for an inverted empty path"Gravatar Brian Salomon2017-08-31
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d5a3f7f9673a152928332a38e53a5fc55f590f40. Reason for revert: GMs changed Original change's description: > Add a GrShape::Type value for an inverted empty path > > Change-Id: Ib34a608db07a2ff1d7bdfbd96867fa5ff0ac9782 > Reviewed-on: https://skia-review.googlesource.com/41540 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Brian Salomon <bsalomon@google.com> TBR=bsalomon@google.com,robertphillips@google.com Change-Id: I320dcda62bdb08163fe274325a38f59dd51b3927 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/41640 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Add a GrShape::Type value for an inverted empty pathGravatar Brian Salomon2017-08-31
| | | | | | | Change-Id: Ib34a608db07a2ff1d7bdfbd96867fa5ff0ac9782 Reviewed-on: https://skia-review.googlesource.com/41540 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Replace SkFAIL with SK_ABORT.Gravatar Ben Wagner2017-08-16
| | | | | | | | | | | | SkFAIL is a legacy macro which is just SK_ABORT. This CL mechanically changes uses of SkFAIL to SK_ABORT in preparation for its removal. The related sk_throw macro will be changed independently, due to needing to actually clean up its users. Change-Id: Id70b5c111a02d2458dc60c8933f444df27d9cebb Reviewed-on: https://skia-review.googlesource.com/35284 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Don't compute path keys for volatile paths in GrShape.Gravatar bsalomon2016-09-23
| | | | | | | | | Otherwise, we will compute cache keys for internally transformed paths that don't repeat (e.g. clip paths transformed into device space with a changing view matrix). BUG=chromium:649562 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2369513002 Review-Url: https://codereview.chromium.org/2369513002
* Use sk_careful_memcpy when writing optional conic weights for GrShape path ↵Gravatar bsalomon2016-09-21
| | | | | | | | | | | data key. TBR=robertphillips@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2359933002 NO_DEPENDENCY_CHECKS=true Review-Url: https://codereview.chromium.org/2359933002
* Make GrShape compute keys for short paths from path data instead of using ↵Gravatar bsalomon2016-09-21
| | | | | | | | the gen id. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2357643002 Review-Url: https://codereview.chromium.org/2357643002
* Stop closing filled paths in GrShapeGravatar bsalomon2016-09-21
| | | | | | | | This can force a copy of the path data and isn't really being taken advantage of. It complicates a forthcoming change to key small paths based on their data rather than gen id. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2355833002 Committed: https://skia.googlesource.com/skia/+/ad001fdc77b2dfe32c1723cb58636728dfb776d8 Review-Url: https://codereview.chromium.org/2355833002
* Revert of Stop closing filled paths in GrShape (patchset #1 id:1 of ↵Gravatar fmalita2016-09-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/2355833002/ ) Reason for revert: Triggers msaa16 asserts: https://build.chromium.org/p/client.skia/builders/Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug/builds/4236/steps/test_skia%20on%20Windows/logs/stdio c:\b\work\skia\src\gpu\grmesh.h:76: fatal error: "assert(indexCount)" Caught exception 2147483651 EXCEPTION_BREAKPOINT, was running: msaa16 svg cartman.svg Likely culprit: msaa16 svg cartman.svg Original issue's description: > Stop closing filled paths in GrShape > > This can force a copy of the path data and isn't really being taken advantage of. It complicates a forthcoming change to key small paths based on their data rather than gen id. > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2355833002 > > Committed: https://skia.googlesource.com/skia/+/ad001fdc77b2dfe32c1723cb58636728dfb776d8 TBR=robertphillips@google.com,bsalomon@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review-Url: https://codereview.chromium.org/2357713002
* Stop closing filled paths in GrShapeGravatar bsalomon2016-09-20
| | | | | | | This can force a copy of the path data and isn't really being taken advantage of. It complicates a forthcoming change to key small paths based on their data rather than gen id. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2355833002 Review-Url: https://codereview.chromium.org/2355833002
* Consolidate special case shape transformation logic in GrShapeTest.Gravatar bsalomon2016-07-20
| | | | | | | | | | Enable all tests on all geometry types. Add conversion of fill+miter-stroke->fill for rect geometries in GrShape. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2157013003 Review-Url: https://codereview.chromium.org/2157013003
* In GrShape detect that stroked axis-aligned lines are rrects.Gravatar bsalomon2016-07-18
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2151313002 Review-Url: https://codereview.chromium.org/2151313002
* Make lines a special case in GrShapeGravatar bsalomon2016-06-28
| | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2108523002 Committed: https://skia.googlesource.com/skia/+/c62318c748a1907649bd75382c4f4fd10533f2b3 Review-Url: https://codereview.chromium.org/2108523002
* Revert of Make lines a special case in GrShape (patchset #5 id:120001 of ↵Gravatar bsalomon2016-06-28
| | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/2108523002/ ) Reason for revert: Assertion failures Original issue's description: > Make lines a special case in GrShape > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2108523002 > > Committed: https://skia.googlesource.com/skia/+/c62318c748a1907649bd75382c4f4fd10533f2b3 TBR=robertphillips@google.com,egdaniel@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review-Url: https://codereview.chromium.org/2109613003
* Make lines a special case in GrShapeGravatar bsalomon2016-06-28
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2108523002 Review-Url: https://codereview.chromium.org/2108523002
* Use a union inside GrShape to hold geometryGravatar bsalomon2016-06-27
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2094023002 Review-Url: https://codereview.chromium.org/2094023002
* Fix Rob's nits from https://codereview.chromium.org/2085913003Gravatar bsalomon2016-06-23
| | | | | | | TBR=robertphillips@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087393003 Review-Url: https://codereview.chromium.org/2087393003
* Canonicalize path fill types for stroked paths in GrShape.Gravatar bsalomon2016-06-23
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2085913003 Review-Url: https://codereview.chromium.org/2085913003
* Apply canonicalizations to path GrShapes.Gravatar bsalomon2016-06-21
| | | | | | | | | | | | | | | | The following canonicalizations of path-backed GrShapes are added: *convex shapes are stored with even/odd (or inv even/odd) fill. *filled paths are closed. *dashed paths ignore inverseness of the fill This will improve the results of queries about the geometry that will be added in a future change. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2067283003 Review-Url: https://codereview.chromium.org/2067283003
* Some simplifications of GrShape reductions/canonicalizationsGravatar bsalomon2016-06-20
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2064113004 Review-Url: https://codereview.chromium.org/2064113004
* Fix GrShape to preserve inverseness of rrects for strokes but not dashes.Gravatar bsalomon2016-06-14
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2051263003 Review-Url: https://codereview.chromium.org/2051263003
* Add control over whether lines are special cased in SkDashPath. Disable when ↵Gravatar bsalomon2016-06-13
| | | | | | | | called from GrShape. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2055253002 Review-Url: https://codereview.chromium.org/2055253002
* Make GrShape capable of representing inverse filled rrects.Gravatar bsalomon2016-06-10
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2056523002 Review-Url: https://codereview.chromium.org/2056523002
* Make GrShape use the original path when path effect fails.Gravatar bsalomon2016-06-07
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2044793002 Review-Url: https://codereview.chromium.org/2044793002
* Make GrShape track the winding direction and starting point for rrect types.Gravatar bsalomon2016-06-06
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2042813002 Review-Url: https://codereview.chromium.org/2042813002
* Add bounds to GrShapeGravatar bsalomon2016-05-13
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1970003003 Review-Url: https://codereview.chromium.org/1970003003
* Incorporate scale into GrStyle and GrShapeGravatar bsalomon2016-05-09
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1952383003 Review-Url: https://codereview.chromium.org/1952383003
* Make cap only affect the keys of GrShapes that are possibly-openGravatar bsalomon2016-05-04
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1949193002 Review-Url: https://codereview.chromium.org/1949193002
* Fix ASAN errors.Gravatar benjaminwagner2016-05-04
| | | | | | | | | These errors occur when building for GPU but running dm with --nogpu. The current ASAN bots do not catch these because 1) the CPU bot compiles with skia_gpu=0 and 2) the GPU bot runs with --nocpu; whereas the new ASAN bots use the same compile for both the CPU and GPU bots. BUG=skia:5157 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1953473002 Review-Url: https://codereview.chromium.org/1953473002
* Expand GrStyle's interface.Gravatar bsalomon2016-05-04
| | | | | | | | | | | | | | | Adds some basic getters on GrStyle as well as static const instances for fill and hairline. Adds the ability to apply a GrStyle to a SkPath to produce an output SkPath. Moves style key functions from GrShape to GrStyle. Also fixes some issues with SkPath creation when applying style to GrShapes. Adds tests that GrShape produces the correct SkPath when its GrStyle is applied. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1951613002 Review-Url: https://codereview.chromium.org/1951613002
* Add support for building GrShape from SkPath and more testsGravatar bsalomon2016-04-27
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1922713002 Review URL: https://codereview.chromium.org/1922713002
* Add initial implementation of GrShape and GrStyle classes and testsGravatar bsalomon2016-04-26
| | | | | | | | | | | | | The initial intent is to use GrShape to simplify the mask blur code paths. However, I also want to use this to explore a more unified drawing code flow for different geometry types. The goal is to have a single representation for geometries+styling that attempts to always keep the geometry in the simplest form (e.g. preferring rrects to paths). It also allows for converting styling information into modified geometry and for computing consistent keys. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1822723003 Committed: https://skia.googlesource.com/skia/+/c885dacfe4625af8b0e2e5c6e8a8ae8dc2d620a8 Committed: https://skia.googlesource.com/skia/+/824e58fc6df8fc149d9675f577f7deeaba698b09 Review URL: https://codereview.chromium.org/1822723003
* Revert of Add initial implementation of GrShape and GrStyle classes and ↵Gravatar bsalomon2016-04-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | tests (patchset #11 id:280001 of https://codereview.chromium.org/1822723003/ ) Reason for revert: test failing Original issue's description: > Add initial implementation of GrShape and GrStyle classes and tests > > The initial intent is to use GrShape to simplify the mask blur code paths. However, I also want to use this to explore a more unified drawing code flow for different geometry types. The goal is to have a single representation for geometries+styling that attempts to always keep the geometry in the simplest form (e.g. preferring rrects to paths). It also allows for converting styling information into modified geometry and for computing consistent keys. > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1822723003 > > Committed: https://skia.googlesource.com/skia/+/c885dacfe4625af8b0e2e5c6e8a8ae8dc2d620a8 > > Committed: https://skia.googlesource.com/skia/+/824e58fc6df8fc149d9675f577f7deeaba698b09 TBR=robertphillips@google.com,egdaniel@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1919243002