diff options
author | 2015-07-31 06:48:27 -0700 | |
---|---|---|
committer | 2015-07-31 06:48:27 -0700 | |
commit | 0aff2fa82a5fa9f99aa77327dac3e9e803b4ed07 (patch) | |
tree | 622deb8887694c291e7b5ec74d41abd2f211ae67 /src/gpu/GrAADistanceFieldPathRenderer.h | |
parent | 99cab4e3081e7e0ae8a72eb53cb42b1bef3719a3 (diff) |
Also provides the ResourceProvider to onDrawPath which allows the DF PR to no longer require access to GrContext.
Review URL: https://codereview.chromium.org/1265763002
Diffstat (limited to 'src/gpu/GrAADistanceFieldPathRenderer.h')
-rwxr-xr-x | src/gpu/GrAADistanceFieldPathRenderer.h | 33 |
1 files changed, 10 insertions, 23 deletions
diff --git a/src/gpu/GrAADistanceFieldPathRenderer.h b/src/gpu/GrAADistanceFieldPathRenderer.h index bb76eff252..30846e433e 100755 --- a/src/gpu/GrAADistanceFieldPathRenderer.h +++ b/src/gpu/GrAADistanceFieldPathRenderer.h @@ -20,31 +20,19 @@ class GrContext; class GrAADistanceFieldPathRenderer : public GrPathRenderer { public: - GrAADistanceFieldPathRenderer(GrContext* context); + GrAADistanceFieldPathRenderer(); virtual ~GrAADistanceFieldPathRenderer(); - - virtual 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; private: + StencilSupport onGetStencilSupport(const GrDrawTarget*, + const GrPipelineBuilder*, + const SkPath&, + const GrStrokeInfo&) const override; + + bool onCanDrawPath(const CanDrawPathArgs&) const override; + + bool onDrawPath(const DrawPathArgs&) override; + struct PathData { struct Key { uint32_t fGenID; @@ -75,7 +63,6 @@ private: typedef SkTDynamicHash<PathData, PathData::Key> PathCache; typedef SkTInternalLList<PathData> PathDataList; - GrContext* fContext; GrBatchAtlas* fAtlas; PathCache fPathCache; PathDataList fPathList; |