aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/GrShapeTest.cpp
Commit message (Collapse)AuthorAge
* Try out new refFoo pattern on GrStyleGravatar Robert Phillips2017-01-13
| | | | | | | Change-Id: Ic7f30e3730a3431adf365d729320fe50f38dcea8 Reviewed-on: https://skia-review.googlesource.com/6907 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* change SkClipOp to a class enumGravatar Mike Reed2016-12-12
| | | | | | | | | BUG=skia: Change-Id: I25dbe6d6b8666a2a0a7be7bdd2ae0b067868d14e Reviewed-on: https://skia-review.googlesource.com/5718 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert[2] "remove SK_SUPPORT_LEGACY_CLIP_REGIONOPS"Gravatar Mike Reed2016-12-09
| | | | | | | | | | | This reverts commit a129dfef2aaab0b5995cdf1ab7b2cdd41c29cf72. BUG=skia: Change-Id: I717de6e5fcd4516aa684b014b1414b0f82ac2b91 Reviewed-on: https://skia-review.googlesource.com/5722 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Derek Sollenberger <djsollen@google.com>
* Revert "remove SK_SUPPORT_LEGACY_CLIP_REGIONOPS"Gravatar Mike Reed2016-12-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8e7432b7f98dd592e529a0c8bb038d73ebfb0478. Reason for revert: <INSERT REASONING HERE> external/skia/bench/../tools/android/SkAndroidSDKCanvas.h:103:36: error: C++ requires a type specifier for all declarations void onClipRect(const SkRect&, ClipOp, ClipEdgeStyle) override; Original change's description: > remove SK_SUPPORT_LEGACY_CLIP_REGIONOPS > > > switch over to SkClipOps now that SK_SUPPORT_LEGACY_CLIP_REGIONOPS is gone > > BUG=skia: > > Change-Id: Ifdc8b3746d508348a40cc009a4e529a1cb3c405d > Reviewed-on: https://skia-review.googlesource.com/5714 > Commit-Queue: Mike Reed <reed@google.com> > Reviewed-by: Mike Reed <reed@google.com> > TBR=reed@google.com,reviews@skia.org BUG=skia: NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: If26ea91d7464615e43c1d3d2f726e337ff56b55c Reviewed-on: https://skia-review.googlesource.com/5721 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Reed <reed@google.com>
* remove SK_SUPPORT_LEGACY_CLIP_REGIONOPSGravatar Mike Reed2016-12-08
| | | | | | | | | | | switch over to SkClipOps now that SK_SUPPORT_LEGACY_CLIP_REGIONOPS is gone BUG=skia: Change-Id: Ifdc8b3746d508348a40cc009a4e529a1cb3c405d Reviewed-on: https://skia-review.googlesource.com/5714 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Remove stray semicolons.Gravatar Mike Klein2016-09-27
| | | | | | | | | | | | | | | | Turns out function declarations don't end in semicolons... BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2720 No public API changes. TBR=reed@google.com Change-Id: I72b56d52e1ff7fa6e89c295b0de8c46599791ebb Reviewed-on: https://skia-review.googlesource.com/2720 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
* 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
* 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
* abstract name of clipping ops, to transtion to a more restricted setGravatar reed2016-09-20
| | | | | | | | | | | SkRegion::Op --> SkCanvas::ClipOp (alias) --> SkClipOp pre-CL needed in chrome : https://codereview.chromium.org/2355583002/ BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2355483002 Review-Url: https://codereview.chromium.org/2355483002
* Fix bounds check in grshape testGravatar bsalomon2016-08-26
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2274113004 Review-Url: https://codereview.chromium.org/2274113004
* Update GrShape test to allow more flexible shape creation.Gravatar bsalomon2016-08-24
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2277483002 Review-Url: https://codereview.chromium.org/2277483002
* 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
* Add some more getters to GrShape.Gravatar bsalomon2016-06-23
| | | | | | | | These will be used to deploy GrShape in GrPathRenderer subclasses. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2070643002 Review-Url: https://codereview.chromium.org/2070643002
* 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 large array of GrShapes in test code heap allocatedGravatar bsalomon2016-06-10
| | | | | | | TBR=mtklein@chormium.org GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2058343002 Review-Url: https://codereview.chromium.org/2058343002
* 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 SkDashPathEffect fail for stroke+fill style (in addition to fill style)Gravatar bsalomon2016-06-09
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2048183002 Review-Url: https://codereview.chromium.org/2048183002
* 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
* Get segment masks from GrShape.Gravatar bsalomon2016-06-07
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2046753002 Review-Url: https://codereview.chromium.org/2046753002
* 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
* Add isEmpty() query to GrShape and improve comments.Gravatar bsalomon2016-05-11
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1971613004 Review-Url: https://codereview.chromium.org/1971613004
* 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
* Fix issue where GrStyle::applyToPath exited before applying strokeGravatar bsalomon2016-05-06
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1954123002 Review-Url: https://codereview.chromium.org/1954123002
* Stop banning stroke-and-fill for GrStyle and add testsGravatar bsalomon2016-05-05
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1949943003 Review-Url: https://codereview.chromium.org/1949943003
* 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
* Add some more testing around hairline GrShapesGravatar bsalomon2016-05-04
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1949903002 Review-Url: https://codereview.chromium.org/1949903002
* 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
* Detect empty (r)rects in GrShape.Gravatar bsalomon2016-04-28
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1929643002 Review-Url: https://codereview.chromium.org/1929643002
* Add tests for volatile paths to GrShapeTestGravatar bsalomon2016-04-27
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1923403003 Review-Url: https://codereview.chromium.org/1923403003
* Add tests for empty GrShapes.Gravatar bsalomon2016-04-27
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1927673002 Review-Url: https://codereview.chromium.org/1927673002
* 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
* 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 Review URL: https://codereview.chromium.org/1822723003
* Revert of Add initial implementation of GrShape and GrStyle classes and ↵Gravatar robertphillips2016-04-26
| | | | | | | | | | | | | | | | | | | | | | | | | | tests (patchset #10 id:260001 of https://codereview.chromium.org/1822723003/ ) Reason for revert: From what I can tell, this compiles on 2015 but not 2013. 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 TBR=egdaniel@google.com,bsalomon@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/1918203002
* Add initial implementation of GrShape and GrStyle classes and testsGravatar bsalomon2016-04-25
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 Review URL: https://codereview.chromium.org/1822723003