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

Unified Diff: src/gpu/GrGpu.h

Issue 816513003: Stop creating GrODS for stencilPath commands. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years 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 611b7a51fe3f55ebf85f9ab602351f380e690bdc..a657d17c5c33d3cc2fd22f3e6d39d98c42bf880a 100644
--- a/src/gpu/GrGpu.h
+++ b/src/gpu/GrGpu.h
@@ -303,7 +303,6 @@ public:
kDrawPoints_DrawType,
kDrawLines_DrawType,
kDrawTriangles_DrawType,
- kStencilPath_DrawType,
kDrawPath_DrawType,
kDrawPaths_DrawType,
};
@@ -358,7 +357,18 @@ public:
const SkIPoint& dstPoint) = 0;
void draw(const GrOptDrawState&, const GrDrawTarget::DrawInfo&);
- void stencilPath(const GrOptDrawState&, const GrPath*, const GrStencilSettings&);
+
+ /** None of these params are optional, pointers used just to avoid making copies. */
+ struct StencilPathState {
+ bool fUseHWAA;
+ GrRenderTarget* fRenderTarget;
+ const SkMatrix* fViewMatrix;
+ const GrStencilSettings* fStencil;
+ const GrScissorState* fScissor;
+ };
+
+ void stencilPath(const GrPath*, const StencilPathState&);
+
void drawPath(const GrOptDrawState&, const GrPath*, const GrStencilSettings&);
void drawPaths(const GrOptDrawState&,
const GrPathRange*,
@@ -436,7 +446,8 @@ private:
// overridden by backend-specific derived class to perform the draw call.
virtual void onDraw(const GrOptDrawState&, const GrDrawTarget::DrawInfo&) = 0;
- virtual void onStencilPath(const GrOptDrawState&, const GrPath*, const GrStencilSettings&) = 0;
+ virtual void onStencilPath(const GrPath*, const StencilPathState&) = 0;
+
virtual void onDrawPath(const GrOptDrawState&, const GrPath*, const GrStencilSettings&) = 0;
virtual void onDrawPaths(const GrOptDrawState&,
const GrPathRange*,
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/GrGpu.cpp » ('j') | src/gpu/GrInOrderDrawBuffer.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698