struct GrPoint;
/**
- * A path renderer.
+ * Base class for drawing paths into a GrDrawTarget.
*/
class GrPathRenderer {
public:
* clips.
*/
virtual bool requiresStencilPass(const GrDrawTarget* target,
- GrPathIter* path,
+ GrPathIter* path,
GrPathFill fill) const { return false; }
-
+
bool requiresStencilPass(const GrDrawTarget* target,
- const GrPath& path,
- GrPathFill fill) const {
+ const GrPath& path,
+ GrPathFill fill) const {
GrPath::Iter iter(path);
return requiresStencilPass(target, &iter, fill);
}
/**
- * Draws a path to the stencil buffer. Assume the writable stencil bits
+ * Draws a path to the stencil buffer. Assume the writable stencil bits
* are already initialized to zero. Fill will always be either
* kWinding_PathFill or kEvenOdd_PathFill.
*
}
};
+/**
+ * Subclass that renders the path using the stencil buffer to resolve fill
+ * rules (e.g. winding, even-odd)
+ */
class GrDefaultPathRenderer : public GrPathRenderer {
public:
GrDefaultPathRenderer(bool separateStencilSupport,
GrPathFill fill,
const GrPoint* translate);
virtual bool requiresStencilPass(const GrDrawTarget* target,
- GrPathIter* path,
+ GrPathIter* path,
GrPathFill fill) const;
virtual void drawPathToStencil(GrDrawTarget* target,
GrPathIter* path,
bool fStencilWrapOps;
};
-#endif
\ No newline at end of file
+#endif