aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrPathRenderer.h
diff options
context:
space:
mode:
authorGravatar sugoi@google.com <sugoi@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-12-06 20:13:11 +0000
committerGravatar sugoi@google.com <sugoi@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-12-06 20:13:11 +0000
commit12b4e27ae1a29460e91a59f38122483e1faec697 (patch)
treeed783f409c707e748cd0db8c635a6e97d328886d /src/gpu/GrPathRenderer.h
parentdf6fe603a592be6495a61b4ad2e8b8fad452c2ac (diff)
As part of preliminary groundwork for a chromium fix, this changelist is deprecating GrPathFill so that SkPath::FillType is used everywhere in order to remove some code duplication between Skia and Ganesh.
BUG=chromium:135111 TEST=Try path rendering tests from the gm Review URL: https://codereview.appspot.com/6875058 git-svn-id: http://skia.googlecode.com/svn/trunk@6693 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/GrPathRenderer.h')
-rw-r--r--src/gpu/GrPathRenderer.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/gpu/GrPathRenderer.h b/src/gpu/GrPathRenderer.h
index fc3d67289a..afcd3c9c22 100644
--- a/src/gpu/GrPathRenderer.h
+++ b/src/gpu/GrPathRenderer.h
@@ -16,6 +16,7 @@
#include "SkTArray.h"
class SkPath;
+class SkStroke;
struct GrPoint;
@@ -57,10 +58,9 @@ public:
* the target's stencil settings but use those already set on target. The
* target is passed as a param in case the answer depends upon draw state.
*
- * @param target target that the path will be rendered to
- * @param path the path that will be drawn
- * @param fill the fill rule that will be used, will never be an inverse
- * rule.
+ * @param target target that the path will be rendered to
+ * @param path the path that will be drawn
+ * @param stroke the stroke information (width, join, cap).
*
* @return false if this path renderer can generate interior-only fragments
* without changing the stencil settings on the target. If it
@@ -68,7 +68,7 @@ public:
* clips.
*/
virtual bool requiresStencilPass(const SkPath& path,
- GrPathFill fill,
+ const SkStroke& stroke,
const GrDrawTarget* target) const {
return false;
}
@@ -80,14 +80,14 @@ public:
* rendering a path.
*
* @param path The path to draw
- * @param fill The fill rule to use
+ * @param stroke The stroke information (width, join, cap)
* @param target The target that the path will be rendered to
* @param antiAlias True if anti-aliasing is required.
*
* @return true if the path can be drawn by this object, false otherwise.
*/
virtual bool canDrawPath(const SkPath& path,
- GrPathFill fill,
+ const SkStroke& stroke,
const GrDrawTarget* target,
bool antiAlias) const = 0;
/**
@@ -96,22 +96,22 @@ public:
* path renderer didn't claim that it needs to use the stencil internally).
*
* @param path the path to draw.
- * @param fill the path filling rule to use.
+ * @param stroke the stroke information (width, join, cap)
* @param target target that the path will be rendered to
* @param antiAlias true if anti-aliasing is required.
*/
virtual bool drawPath(const SkPath& path,
- GrPathFill fill,
+ const SkStroke& stroke,
GrDrawTarget* target,
bool antiAlias) {
- GrAssert(this->canDrawPath(path, fill, target, antiAlias));
- return this->onDrawPath(path, fill, target, antiAlias);
+ GrAssert(this->canDrawPath(path, stroke, target, antiAlias));
+ return this->onDrawPath(path, stroke, target, antiAlias);
}
/**
* Draws the path to the stencil buffer. Assume the writable stencil bits
* are already initialized to zero. Fill will always be either
- * kWinding_GrPathFill or kEvenOdd_GrPathFill.
+ * kWinding_FillType or kEvenOdd_FillType.
*
* Only called if requiresStencilPass returns true for the same combo of
* target, path, and fill. Never called with an inverse fill.
@@ -121,7 +121,7 @@ public:
*
*/
virtual void drawPathToStencil(const SkPath& path,
- GrPathFill fill,
+ const SkStroke& stroke,
GrDrawTarget* target) {
GrCrash("Unexpected call to drawPathToStencil.");
}
@@ -131,12 +131,12 @@ protected:
* Draws the path into the draw target.
*
* @param path the path to draw.
- * @param fill the path filling rule to use.
+ * @param stroke the stroke information (width, join, cap)
* @param target target that the path will be rendered to
* @param antiAlias whether antialiasing is enabled or not.
*/
virtual bool onDrawPath(const SkPath& path,
- GrPathFill fill,
+ const SkStroke& stroke,
GrDrawTarget* target,
bool antiAlias) = 0;