Commit Graph

41 Commits

Author SHA1 Message Date
Mike Klein
fc6c37b981 Remove stray semicolons.
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>
2016-09-27 14:04:26 +00:00
bsalomon
aa840647fc Don't compute path keys for volatile paths in GrShape.
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
2016-09-23 12:09:16 -07:00
bsalomon
67fa4e31d8 Make GrShape compute keys for short paths from path data instead of using the gen id.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2357643002

Review-Url: https://codereview.chromium.org/2357643002
2016-09-21 08:26:57 -07:00
reed
73603f3c52 abstract name of clipping ops, to transtion to a more restricted set
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
2016-09-20 08:42:39 -07:00
bsalomon
164fd9fa46 Fix bounds check in grshape test
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2274113004

Review-Url: https://codereview.chromium.org/2274113004
2016-08-26 06:45:06 -07:00
bsalomon
a395f7c7a5 Update GrShape test to allow more flexible shape creation.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2277483002

Review-Url: https://codereview.chromium.org/2277483002
2016-08-24 17:47:41 -07:00
bsalomon
487f8d385b Consolidate special case shape transformation logic in GrShapeTest.
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
2016-07-20 07:15:44 -07:00
bsalomon
0ae36a2ceb In GrShape detect that stroked axis-aligned lines are rrects.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2151313002

Review-Url: https://codereview.chromium.org/2151313002
2016-07-18 07:31:13 -07:00
bsalomon
0a0f67ecec 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
Review-Url: https://codereview.chromium.org/2108523002
2016-06-28 11:56:42 -07:00
bsalomon
635df95a9a Revert of Make lines a special case in GrShape (patchset #5 id:120001 of 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
2016-06-28 11:18:47 -07:00
bsalomon
c62318c748 Make lines a special case in GrShape
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2108523002

Review-Url: https://codereview.chromium.org/2108523002
2016-06-28 10:41:35 -07:00
bsalomon
425c27fab9 Add some more getters to GrShape.
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
2016-06-23 13:18:45 -07:00
bsalomon
ac5fcea9c3 Fix Rob's nits from https://codereview.chromium.org/2085913003
TBR=robertphillips@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2087393003

Review-Url: https://codereview.chromium.org/2087393003
2016-06-23 12:23:07 -07:00
bsalomon
a4817afe50 Canonicalize path fill types for stroked paths in GrShape.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2085913003

Review-Url: https://codereview.chromium.org/2085913003
2016-06-23 11:48:26 -07:00
bsalomon
93f66bc3af Apply canonicalizations to path GrShapes.
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
2016-06-21 08:35:49 -07:00
bsalomon
1b28c1adc1 Some simplifications of GrShape reductions/canonicalizations
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2064113004

Review-Url: https://codereview.chromium.org/2064113004
2016-06-20 12:28:17 -07:00
bsalomon
fd32df716c Fix GrShape to preserve inverseness of rrects for strokes but not dashes.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2051263003

Review-Url: https://codereview.chromium.org/2051263003
2016-06-14 14:37:21 -07:00
bsalomon
398e3f4b9f Add control over whether lines are special cased in SkDashPath. Disable when called from GrShape.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2055253002

Review-Url: https://codereview.chromium.org/2055253002
2016-06-13 10:22:48 -07:00
bsalomon
cadb5a24c2 Make large array of GrShapes in test code heap allocated
TBR=mtklein@chormium.org
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2058343002

Review-Url: https://codereview.chromium.org/2058343002
2016-06-10 18:28:06 -07:00
bsalomon
7049396b65 Make GrShape capable of representing inverse filled rrects.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2056523002

Review-Url: https://codereview.chromium.org/2056523002
2016-06-10 08:05:14 -07:00
bsalomon
a058786ae3 Make SkDashPathEffect fail for stroke+fill style (in addition to fill style)
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2048183002

Review-Url: https://codereview.chromium.org/2048183002
2016-06-09 06:03:38 -07:00
bsalomon
d67238421d Make GrShape use the original path when path effect fails.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2044793002

Review-Url: https://codereview.chromium.org/2044793002
2016-06-07 12:20:15 -07:00
bsalomon
06115ee430 Get segment masks from GrShape.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2046753002

Review-Url: https://codereview.chromium.org/2046753002
2016-06-07 06:28:51 -07:00
bsalomon
ee295645bd Make GrShape track the winding direction and starting point for rrect types.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2042813002

Review-Url: https://codereview.chromium.org/2042813002
2016-06-06 14:01:25 -07:00
bsalomon
9fb420393e Add bounds to GrShape
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
2016-05-13 09:23:38 -07:00
bsalomon
7c73a53894 Add isEmpty() query to GrShape and improve comments.
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
2016-05-11 15:15:56 -07:00
bsalomon
97fd2d42b9 Incorporate scale into GrStyle and GrShape
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
2016-05-09 13:02:01 -07:00
bsalomon
1a0b9ed7d8 Fix issue where GrStyle::applyToPath exited before applying stroke
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
2016-05-06 11:07:04 -07:00
bsalomon
f0cf355b55 Stop banning stroke-and-fill for GrStyle and add tests
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
2016-05-05 08:28:30 -07:00
bsalomon
06077565b1 Make cap only affect the keys of GrShapes that are possibly-open
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
2016-05-04 13:50:29 -07:00
bsalomon
9ad5d7c84b Add some more testing around hairline GrShapes
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
2016-05-04 08:44:15 -07:00
bsalomon
fb08327e59 Expand GrStyle's interface.
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
2016-05-04 08:27:42 -07:00
bsalomon
5e410b4a68 Detect empty (r)rects in GrShape.
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
2016-04-28 09:30:46 -07:00
bsalomon
4eeccc9de7 Add tests for volatile paths to GrShapeTest
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
2016-04-27 13:30:25 -07:00
bsalomon
409ed73237 Add tests for empty GrShapes.
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
2016-04-27 12:36:02 -07:00
bsalomon
72dc51c288 Add support for building GrShape from SkPath and more tests
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
2016-04-27 06:46:23 -07:00
bsalomon
47cc769118 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

Review URL: https://codereview.chromium.org/1822723003
2016-04-26 12:56:00 -07:00
bsalomon
82ecc5773f Revert of Add initial implementation of GrShape and GrStyle classes and 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
2016-04-26 08:41:47 -07:00
bsalomon
824e58fc6d 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

Review URL: https://codereview.chromium.org/1822723003
2016-04-26 06:53:45 -07:00
robertphillips
83af0a63b1 Revert of Add initial implementation of GrShape and GrStyle classes and 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
2016-04-26 05:07:23 -07:00
bsalomon
c885dacfe4 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

Review URL: https://codereview.chromium.org/1822723003
2016-04-25 13:37:22 -07:00