diff options
author | 2014-12-17 13:43:13 -0800 | |
---|---|---|
committer | 2014-12-17 13:43:13 -0800 | |
commit | 3e79124a69d4806f0a1a776090bff718e1b90970 (patch) | |
tree | cb424a22eaf2874a292116e6ec5138f9605530f7 /src/gpu/GrGpu.h | |
parent | 8750924a1470e8215b2a344155259b93062d3fa2 (diff) |
Stop creating GrODS for stencilPath commands.
Review URL: https://codereview.chromium.org/816513003
Diffstat (limited to 'src/gpu/GrGpu.h')
-rw-r--r-- | src/gpu/GrGpu.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h index 611b7a51fe..a657d17c5c 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*, |