aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrPathRendering.h
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2014-10-31 13:56:50 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-10-31 13:56:50 -0700
commit92e496f96abbd664888f0c8a7d546ab02e703bf7 (patch)
treea9396fed2f759f748efe086fd76eee6f7bc6c762 /src/gpu/GrPathRendering.h
parent2faa2284357d7cec51b26d8251c53bc91251b1fe (diff)
Beginning to refactor nvpr code
Diffstat (limited to 'src/gpu/GrPathRendering.h')
-rw-r--r--src/gpu/GrPathRendering.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/gpu/GrPathRendering.h b/src/gpu/GrPathRendering.h
index 26cfa110ce..cd42206f43 100644
--- a/src/gpu/GrPathRendering.h
+++ b/src/gpu/GrPathRendering.h
@@ -16,6 +16,7 @@ class SkDescriptor;
class SkTypeface;
class GrPath;
class GrGpu;
+class GrStencilSettings;
/**
* Abstract class wrapping HW path rendering API.
@@ -33,6 +34,18 @@ class GrPathRendering {
public:
virtual ~GrPathRendering() { }
+ // No native support for inverse at this time
+ enum FillType {
+ /** Specifies that "inside" is computed by a non-zero sum of signed
+ edge crossings
+ */
+ kWinding_FillType,
+ /** Specifies that "inside" is computed by an odd number of edge
+ crossings
+ */
+ kEvenOdd_FillType,
+ };
+
enum PathTransformType {
kNone_PathTransformType, //!< []
kTranslateX_PathTransformType, //!< [kMTransX]
@@ -111,10 +124,11 @@ public:
*/
virtual GrPathRange* createGlyphs(const SkTypeface*, const SkDescriptor*, const SkStrokeRec&) = 0;
- virtual void stencilPath(const GrPath*, SkPath::FillType) = 0;
- virtual void drawPath(const GrPath*, SkPath::FillType) = 0;
+ virtual void stencilPath(const GrPath*, const GrStencilSettings&) = 0;
+ virtual void drawPath(const GrPath*, const GrStencilSettings&) = 0;
virtual void drawPaths(const GrPathRange*, const uint32_t indices[], int count,
- const float transforms[], PathTransformType, SkPath::FillType) = 0;
+ const float transforms[], PathTransformType,
+ const GrStencilSettings&) = 0;
protected:
GrPathRendering() { }