simplify GrPathRenderer interface
Review URL: http://codereview.appspot.com/5706053/
git-svn-id: http://skia.googlecode.com/svn/trunk@3312 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrDefaultPathRenderer.h b/src/gpu/GrDefaultPathRenderer.h
index adfe7d2..a6a4cda 100644
--- a/src/gpu/GrDefaultPathRenderer.h
+++ b/src/gpu/GrDefaultPathRenderer.h
@@ -20,40 +20,49 @@
GrDefaultPathRenderer(bool separateStencilSupport,
bool stencilWrapOpsSupport);
- virtual bool canDrawPath(const GrDrawTarget::Caps& targetCaps,
- const SkPath& path,
- GrPathFill fill,
- bool antiAlias) const SK_OVERRIDE;
- virtual bool requiresStencilPass(const GrDrawTarget* target,
- const SkPath& path,
- GrPathFill fill) const SK_OVERRIDE;
+ virtual bool requiresStencilPass(const SkPath& path,
+ GrPathFill fill,
+ const GrDrawTarget* target) const SK_OVERRIDE;
- virtual void drawPath(GrDrawState::StageMask stageMask) SK_OVERRIDE;
- virtual void drawPathToStencil() SK_OVERRIDE;
+ virtual bool canDrawPath(const SkPath& path,
+ GrPathFill fill,
+ const GrDrawTarget* target,
+ bool antiAlias) const SK_OVERRIDE;
-protected:
- virtual void pathWillClear();
+ virtual void drawPathToStencil(const SkPath& path,
+ GrPathFill fill,
+ GrDrawTarget* target) SK_OVERRIDE;
private:
- void onDrawPath(GrDrawState::StageMask stages, bool stencilOnly);
+ virtual bool onDrawPath(const SkPath& path,
+ GrPathFill fill,
+ const GrVec* translate,
+ GrDrawTarget* target,
+ GrDrawState::StageMask stageMask,
+ bool antiAlias) SK_OVERRIDE;
- bool createGeom(GrScalar srcSpaceTol,
- GrDrawState::StageMask stages);
+ bool internalDrawPath(const SkPath& path,
+ GrPathFill fill,
+ const GrVec* translate,
+ GrDrawTarget* target,
+ GrDrawState::StageMask stageMask,
+ bool stencilOnly);
+
+ bool createGeom(const SkPath& path,
+ GrPathFill fill,
+ const GrVec* translate,
+ GrScalar srcSpaceTol,
+ GrDrawTarget* target,
+ GrDrawState::StageMask stages,
+ GrPrimitiveType* primType,
+ int* vertexCnt,
+ int* indexCnt);
bool fSeparateStencil;
bool fStencilWrapOps;
- int fSubpathCount;
- SkAutoSTMalloc<8, uint16_t> fSubpathVertCount;
- int fIndexCnt;
- int fVertexCnt;
- GrScalar fPreviousSrcTol;
- GrDrawState::StageMask fPreviousStages;
- GrPrimitiveType fPrimitiveType;
- bool fUseIndexedDraw;
-
typedef GrPathRenderer INHERITED;
};