Index: src/gpu/GrAALinearizingConvexPathRenderer.cpp |
diff --git a/src/gpu/GrAALinearizingConvexPathRenderer.cpp b/src/gpu/GrAALinearizingConvexPathRenderer.cpp |
index d1c6355daf2fba083366246af7a009a6e6f66db6..a019ed9fe0d66450111a0e7062265b18cae96a2e 100644 |
--- a/src/gpu/GrAALinearizingConvexPathRenderer.cpp |
+++ b/src/gpu/GrAALinearizingConvexPathRenderer.cpp |
@@ -114,7 +114,7 @@ static const GrGeometryProcessor* create_fill_gp(bool tweakAlphaForCoverage, |
return CreateForDeviceSpace(color, coverage, localCoords, viewMatrix); |
} |
-class AAFlatteningConvexPathBatch : public GrBatch { |
+class AAFlatteningConvexPathBatch : public GrVertexBatch { |
public: |
struct Geometry { |
GrColor fColor; |
@@ -125,7 +125,7 @@ public: |
SkScalar fMiterLimit; |
}; |
- static GrBatch* Create(const Geometry& geometry) { |
+ static GrDrawBatch* Create(const Geometry& geometry) { |
return SkNEW_ARGS(AAFlatteningConvexPathBatch, (geometry)); |
} |
@@ -265,13 +265,12 @@ private: |
} |
bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override { |
- if (!GrPipeline::CanCombine(*this->pipeline(), this->bounds(), *t->pipeline(), t->bounds(), |
- caps)) { |
+ AAFlatteningConvexPathBatch* that = t->cast<AAFlatteningConvexPathBatch>(); |
+ if (!GrPipeline::CanCombine(*this->pipeline(), this->bounds(), *that->pipeline(), |
+ that->bounds(), caps)) { |
return false; |
} |
- AAFlatteningConvexPathBatch* that = t->cast<AAFlatteningConvexPathBatch>(); |
- |
SkASSERT(this->usesLocalCoords() == that->usesLocalCoords()); |
if (this->usesLocalCoords() && !this->viewMatrix().cheapEqualTo(that->viewMatrix())) { |
return false; |
@@ -321,7 +320,7 @@ bool GrAALinearizingConvexPathRenderer::onDrawPath(const DrawPathArgs& args) { |
args.fStroke->getJoin(); |
geometry.fMiterLimit = args.fStroke->getMiter(); |
- SkAutoTUnref<GrBatch> batch(AAFlatteningConvexPathBatch::Create(geometry)); |
+ SkAutoTUnref<GrDrawBatch> batch(AAFlatteningConvexPathBatch::Create(geometry)); |
args.fTarget->drawBatch(*args.fPipelineBuilder, batch); |
return true; |
@@ -331,7 +330,7 @@ bool GrAALinearizingConvexPathRenderer::onDrawPath(const DrawPathArgs& args) { |
#ifdef GR_TEST_UTILS |
-BATCH_TEST_DEFINE(AAFlatteningConvexPathBatch) { |
+DRAW_BATCH_TEST_DEFINE(AAFlatteningConvexPathBatch) { |
AAFlatteningConvexPathBatch::Geometry geometry; |
geometry.fColor = GrRandomColor(random); |
geometry.fViewMatrix = GrTest::TestMatrixInvertible(random); |