| Index: src/gpu/GrGpu.h
|
| diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h
|
| index 239ae6bd8362d3dbd25a7ca8b76027f8169afb6f..01e097126f37b484aaa7346982383cc64b586d73 100644
|
| --- a/src/gpu/GrGpu.h
|
| +++ b/src/gpu/GrGpu.h
|
| @@ -335,12 +335,17 @@ public:
|
| // clipping.
|
| };
|
|
|
| + void setStencilPathSettings(const GrStencilSettings& settings) {
|
| + fStencilPathSettings = settings;
|
| + }
|
| +
|
| protected:
|
| enum DrawType {
|
| kDrawPoints_DrawType,
|
| kDrawLines_DrawType,
|
| kDrawTriangles_DrawType,
|
| kStencilPath_DrawType,
|
| + kDrawPath_DrawType,
|
| };
|
|
|
| DrawType PrimTypeToDrawType(GrPrimitiveType type) {
|
| @@ -397,6 +402,7 @@ protected:
|
|
|
| // The final stencil settings to use as determined by the clip manager.
|
| GrStencilSettings fStencilSettings;
|
| + GrStencilSettings fStencilPathSettings;
|
|
|
| // Derived classes need access to this so they can fill it out in their
|
| // constructors
|
| @@ -440,15 +446,12 @@ private:
|
|
|
| // overridden by backend-specific derived class to perform the draw call.
|
| virtual void onGpuDraw(const DrawInfo&) = 0;
|
| - // when GrDrawTarget::stencilPath is called the draw state's current stencil
|
| - // settings are ignored. Instead the GrGpu decides the stencil rules
|
| - // necessary to stencil the path. These are still subject to filtering by
|
| - // the clip mask manager.
|
| - virtual void setStencilPathSettings(const GrPath&,
|
| - SkPath::FillType,
|
| - GrStencilSettings* settings) = 0;
|
| +
|
| // overridden by backend-specific derived class to perform the path stenciling.
|
| + virtual const GrStencilSettings& getStencilPathSettings(const GrPath&,
|
| + SkPath::FillType) = 0;
|
| virtual void onGpuStencilPath(const GrPath*, SkPath::FillType) = 0;
|
| + virtual void onGpuDrawPath(const GrPath*, SkPath::FillType) = 0;
|
|
|
| // overridden by backend-specific derived class to perform flush
|
| virtual void onForceRenderTargetFlush() = 0;
|
| @@ -494,6 +497,9 @@ private:
|
| virtual void onStencilPath(const GrPath* path, const SkStrokeRec& stroke,
|
| SkPath::FillType) SK_OVERRIDE;
|
|
|
| + virtual void onDrawPath(const GrPath* path, const SkStrokeRec& stroke,
|
| + SkPath::FillType) SK_OVERRIDE;
|
| +
|
| // readies the pools to provide vertex/index data.
|
| void prepareVertexPool();
|
| void prepareIndexPool();
|
|
|