diff options
author | cdalton <cdalton@nvidia.com> | 2014-11-25 11:00:56 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-25 11:00:56 -0800 |
commit | 55b24afc178e641e17a5664beba7ab2b4982c91a (patch) | |
tree | bfffa193f40098e0416ca05a629bd1afc2aee304 /src/gpu/GrPathRendering.h | |
parent | b116619028ea826b322919d176d9c87f9569d8e7 (diff) |
Add IndexType parameter to GrDrawTarget::drawPaths
Allows the caller to decide whether they sent 8, 16, or 32 bit path
indices.
BUG=skia:
Review URL: https://codereview.chromium.org/746253003
Diffstat (limited to 'src/gpu/GrPathRendering.h')
-rw-r--r-- | src/gpu/GrPathRendering.h | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/src/gpu/GrPathRendering.h b/src/gpu/GrPathRendering.h index cd42206f43..3e2cfc6c9a 100644 --- a/src/gpu/GrPathRendering.h +++ b/src/gpu/GrPathRendering.h @@ -34,17 +34,7 @@ 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, - }; + typedef GrPathRange::PathIndexType PathIndexType; enum PathTransformType { kNone_PathTransformType, //!< [] @@ -74,6 +64,18 @@ public: } } + // 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, + }; + /** * Creates a new gpu path, based on the specified path and stroke and returns it. * The caller owns a ref on the returned path which must be balanced by a call to unref. @@ -126,8 +128,8 @@ public: 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, + virtual void drawPaths(const GrPathRange*, const void* indices, PathIndexType, + const float transformValues[], PathTransformType, int count, const GrStencilSettings&) = 0; protected: GrPathRendering() { } |