From 706f08fbcb7f5275235784f67bd7d188ad04eef2 Mon Sep 17 00:00:00 2001 From: bsalomon Date: Fri, 22 May 2015 07:35:58 -0700 Subject: Move GrPath(Range) creation to ResourceProvider. Review URL: https://codereview.chromium.org/1155593002 --- src/gpu/GrStencilAndCoverPathRenderer.h | 56 ++++++++++++++++----------------- 1 file changed, 27 insertions(+), 29 deletions(-) (limited to 'src/gpu/GrStencilAndCoverPathRenderer.h') diff --git a/src/gpu/GrStencilAndCoverPathRenderer.h b/src/gpu/GrStencilAndCoverPathRenderer.h index 7e3c005f3e..62a378b0a7 100644 --- a/src/gpu/GrStencilAndCoverPathRenderer.h +++ b/src/gpu/GrStencilAndCoverPathRenderer.h @@ -21,41 +21,39 @@ class GrGpu; class GrStencilAndCoverPathRenderer : public GrPathRenderer { public: - static GrPathRenderer* Create(GrContext*); + static GrPathRenderer* Create(GrResourceProvider*, const GrCaps&); - virtual ~GrStencilAndCoverPathRenderer(); - - virtual bool canDrawPath(const GrDrawTarget*, - const GrPipelineBuilder*, - const SkMatrix& viewMatrix, - const SkPath&, - const GrStrokeInfo&, - bool antiAlias) const override; + bool canDrawPath(const GrDrawTarget*, + const GrPipelineBuilder*, + const SkMatrix& viewMatrix, + const SkPath&, + const GrStrokeInfo&, + bool antiAlias) const override; protected: - virtual StencilSupport onGetStencilSupport(const GrDrawTarget*, - const GrPipelineBuilder*, - const SkPath&, - const GrStrokeInfo&) const override; - - virtual bool onDrawPath(GrDrawTarget*, - GrPipelineBuilder*, - GrColor, - const SkMatrix& viewMatrix, - const SkPath&, - const GrStrokeInfo&, - bool antiAlias) override; - - virtual void onStencilPath(GrDrawTarget*, - GrPipelineBuilder*, - const SkMatrix& viewMatrix, - const SkPath&, - const GrStrokeInfo&) override; + StencilSupport onGetStencilSupport(const GrDrawTarget*, + const GrPipelineBuilder*, + const SkPath&, + const GrStrokeInfo&) const override; + + bool onDrawPath(GrDrawTarget*, + GrPipelineBuilder*, + GrColor, + const SkMatrix& viewMatrix, + const SkPath&, + const GrStrokeInfo&, + bool antiAlias) override; + + void onStencilPath(GrDrawTarget*, + GrPipelineBuilder*, + const SkMatrix& viewMatrix, + const SkPath&, + const GrStrokeInfo&) override; private: - GrStencilAndCoverPathRenderer(GrGpu*); + GrStencilAndCoverPathRenderer(GrResourceProvider*); - GrGpu* fGpu; + GrResourceProvider* fResourceProvider; typedef GrPathRenderer INHERITED; }; -- cgit v1.2.3