Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(240)

Unified Diff: src/gpu/GrGpu.h

Issue 22686002: Implement path cover with nv_path_rendering (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Omission with non-inverted path bounds fixed Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/gpu/GrGpu.h
diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h
index 239ae6bd8362d3dbd25a7ca8b76027f8169afb6f..71d77c841f7444cd36422665f4a4327de21deede 100644
--- a/src/gpu/GrGpu.h
+++ b/src/gpu/GrGpu.h
@@ -335,12 +335,20 @@ public:
// clipping.
};
+ void setPathStencilSettings(const GrStencilSettings& settings) {
+ fPathStencilSettings = settings;
+ }
+
+ // overridden by backend-specific derived class to perform the path stenciling.
+ virtual const GrStencilSettings& getPathStencilSettingsForFillType(SkPath::FillType) = 0;
bsalomon 2013/09/18 14:24:22 I wonder if this needs to be virtual. It seems lik
+
protected:
enum DrawType {
kDrawPoints_DrawType,
kDrawLines_DrawType,
kDrawTriangles_DrawType,
kStencilPath_DrawType,
+ kFillPath_DrawType,
};
DrawType PrimTypeToDrawType(GrPrimitiveType type) {
@@ -397,6 +405,8 @@ protected:
// The final stencil settings to use as determined by the clip manager.
GrStencilSettings fStencilSettings;
+ // The final stencil setting to use when stenciling a path with stencilPath.
+ GrStencilSettings fPathStencilSettings;
// Derived classes need access to this so they can fill it out in their
// constructors
@@ -440,15 +450,10 @@ 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 void onGpuStencilPath(const GrPath*, SkPath::FillType) = 0;
+ virtual void onGpuFillPath(const GrPath*, SkPath::FillType) = 0;
// overridden by backend-specific derived class to perform flush
virtual void onForceRenderTargetFlush() = 0;
@@ -494,6 +499,9 @@ private:
virtual void onStencilPath(const GrPath* path, const SkStrokeRec& stroke,
SkPath::FillType) SK_OVERRIDE;
+ virtual void onFillPath(const GrPath* path, const SkStrokeRec& stroke,
+ SkPath::FillType) SK_OVERRIDE;
+
// readies the pools to provide vertex/index data.
void prepareVertexPool();
void prepareIndexPool();

Powered by Google App Engine
This is Rietveld 408576698