diff options
author | 2015-05-04 10:36:42 -0700 | |
---|---|---|
committer | 2015-05-04 10:36:43 -0700 | |
commit | ed0bcad9c8147fd37c23bdda00ec27ec9ef8d66b (patch) | |
tree | 5eba6a70d867c2e7124f06a9670088afe9cd0d99 /src/gpu/GrAAHairLinePathRenderer.h | |
parent | d8ed1b64a6c85a8364c23e825164b7bebb43a3a0 (diff) |
Move instanced index buffer creation to flush time
Committed: https://skia.googlesource.com/skia/+/ab622c7b8cc8c39f0a594e4392b9e31b7e1ddb26
Review URL: https://codereview.chromium.org/1116943004
Diffstat (limited to 'src/gpu/GrAAHairLinePathRenderer.h')
-rw-r--r-- | src/gpu/GrAAHairLinePathRenderer.h | 37 |
1 files changed, 15 insertions, 22 deletions
diff --git a/src/gpu/GrAAHairLinePathRenderer.h b/src/gpu/GrAAHairLinePathRenderer.h index 9f8d8aae9e..b523493bad 100644 --- a/src/gpu/GrAAHairLinePathRenderer.h +++ b/src/gpu/GrAAHairLinePathRenderer.h @@ -13,37 +13,30 @@ class GrAAHairLinePathRenderer : public GrPathRenderer { public: - virtual ~GrAAHairLinePathRenderer(); + static GrPathRenderer* Create() { return SkNEW(GrAAHairLinePathRenderer); } - static GrPathRenderer* Create(GrContext* context); - - 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; typedef SkTArray<SkPoint, true> PtArray; typedef SkTArray<int, true> IntArray; typedef SkTArray<float, true> FloatArray; protected: - virtual bool onDrawPath(GrDrawTarget*, - GrPipelineBuilder*, - GrColor, - const SkMatrix& viewMatrix, - const SkPath&, - const GrStrokeInfo&, - bool antiAlias) override; + bool onDrawPath(GrDrawTarget*, + GrPipelineBuilder*, + GrColor, + const SkMatrix& viewMatrix, + const SkPath&, + const GrStrokeInfo&, + bool antiAlias) override; private: - GrAAHairLinePathRenderer(const GrContext* context, - const GrIndexBuffer* fLinesIndexBuffer, - const GrIndexBuffer* fQuadsIndexBuffer); - - const GrIndexBuffer* fLinesIndexBuffer; - const GrIndexBuffer* fQuadsIndexBuffer; + GrAAHairLinePathRenderer() {} typedef GrPathRenderer INHERITED; }; |