From 3e79124a69d4806f0a1a776090bff718e1b90970 Mon Sep 17 00:00:00 2001 From: bsalomon Date: Wed, 17 Dec 2014 13:43:13 -0800 Subject: Stop creating GrODS for stencilPath commands. Review URL: https://codereview.chromium.org/816513003 --- src/gpu/GrGpu.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'src/gpu/GrGpu.h') 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*, -- cgit v1.2.3