diff options
author | bsalomon <bsalomon@google.com> | 2015-08-13 13:34:48 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-08-13 13:34:48 -0700 |
commit | abd30f54b7ff1704a8930c4307ea242d09425d02 (patch) | |
tree | 08eb5fdaa2fbe55f2e763a1d3c05054896919b68 /gm | |
parent | 8f34372f7e97482e5e61ab298b7edaa008ba2f4c (diff) | |
download | skia-abd30f54b7ff1704a8930c4307ea242d09425d02.tar.gz |
Introduce GrBatch subclasses GrDrawBatch and GrVertexBatch to prepare for non-drawing batches
Review URL: https://codereview.chromium.org/1293583002
Diffstat (limited to 'gm')
-rw-r--r-- | gm/beziereffects.cpp | 15 | ||||
-rw-r--r-- | gm/convexpolyeffect.cpp | 6 |
2 files changed, 11 insertions, 10 deletions
diff --git a/gm/beziereffects.cpp b/gm/beziereffects.cpp index 17b67ee901..a53ac0e96a 100644 --- a/gm/beziereffects.cpp +++ b/gm/beziereffects.cpp @@ -38,8 +38,8 @@ public: const char* name() const override { return "BezierCubicOrConicTestBatch"; } - static GrBatch* Create(const GrGeometryProcessor* gp, const Geometry& geo, - const SkScalar klmEqs[9], SkScalar sign) { + static GrDrawBatch* Create(const GrGeometryProcessor* gp, const Geometry& geo, + const SkScalar klmEqs[9], SkScalar sign) { return SkNEW_ARGS(BezierCubicOrConicTestBatch, (gp, geo, klmEqs, sign)); } @@ -228,7 +228,7 @@ protected: geometry.fColor = color; geometry.fBounds = bounds; - SkAutoTUnref<GrBatch> batch( + SkAutoTUnref<GrDrawBatch> batch( BezierCubicOrConicTestBatch::Create(gp, geometry, klmEqs, klmSigns[c])); tt.target()->drawBatch(pipelineBuilder, batch); @@ -373,7 +373,7 @@ protected: geometry.fColor = color; geometry.fBounds = bounds; - SkAutoTUnref<GrBatch> batch( + SkAutoTUnref<GrDrawBatch> batch( BezierCubicOrConicTestBatch::Create(gp, geometry, klmEqs, 1.f)); tt.target()->drawBatch(pipelineBuilder, batch); @@ -438,8 +438,8 @@ public: const char* name() const override { return "BezierQuadTestBatch"; } - static GrBatch* Create(const GrGeometryProcessor* gp, const Geometry& geo, - const GrPathUtils::QuadUVMatrix& devToUV) { + static GrDrawBatch* Create(const GrGeometryProcessor* gp, const Geometry& geo, + const GrPathUtils::QuadUVMatrix& devToUV) { return SkNEW_ARGS(BezierQuadTestBatch, (gp, geo, devToUV)); } @@ -613,7 +613,8 @@ protected: geometry.fColor = color; geometry.fBounds = bounds; - SkAutoTUnref<GrBatch> batch(BezierQuadTestBatch::Create(gp, geometry, DevToUV)); + SkAutoTUnref<GrDrawBatch> batch(BezierQuadTestBatch::Create(gp, geometry, + DevToUV)); tt.target()->drawBatch(pipelineBuilder, batch); } diff --git a/gm/convexpolyeffect.cpp b/gm/convexpolyeffect.cpp index ba5cc5be25..1c4a0b1841 100644 --- a/gm/convexpolyeffect.cpp +++ b/gm/convexpolyeffect.cpp @@ -36,7 +36,7 @@ public: const char* name() const override { return "ConvexPolyTestBatch"; } - static GrBatch* Create(const GrGeometryProcessor* gp, const Geometry& geo) { + static GrDrawBatch* Create(const GrGeometryProcessor* gp, const Geometry& geo) { return SkNEW_ARGS(ConvexPolyTestBatch, (gp, geo)); } @@ -197,7 +197,7 @@ protected: geometry.fColor = color.fColor; geometry.fBounds = p.getBounds(); - SkAutoTUnref<GrBatch> batch(ConvexPolyTestBatch::Create(gp, geometry)); + SkAutoTUnref<GrDrawBatch> batch(ConvexPolyTestBatch::Create(gp, geometry)); tt.target()->drawBatch(pipelineBuilder, batch); @@ -246,7 +246,7 @@ protected: geometry.fColor = color.fColor; geometry.fBounds = rect; - SkAutoTUnref<GrBatch> batch(ConvexPolyTestBatch::Create(gp, geometry)); + SkAutoTUnref<GrDrawBatch> batch(ConvexPolyTestBatch::Create(gp, geometry)); tt.target()->drawBatch(pipelineBuilder, batch); |