Index: src/gpu/batches/GrAADistanceFieldPathRenderer.cpp |
diff --git a/src/gpu/batches/GrAADistanceFieldPathRenderer.cpp b/src/gpu/batches/GrAADistanceFieldPathRenderer.cpp |
index ed9902ca33cb8c3380a6c8d28999fd7aea47001b..e6be590fc50241e2b1300bc4b2d981e25470d543 100644 |
--- a/src/gpu/batches/GrAADistanceFieldPathRenderer.cpp |
+++ b/src/gpu/batches/GrAADistanceFieldPathRenderer.cpp |
@@ -172,9 +172,9 @@ private: |
} |
struct FlushInfo { |
- SkAutoTUnref<const GrBuffer> fVertexBuffer; |
- SkAutoTUnref<const GrBuffer> fIndexBuffer; |
- SkAutoTUnref<const GrGeometryProcessor> fGeometryProcessor; |
+ SkAutoTUnref<const GrBuffer> fVertexBuffer; |
+ SkAutoTUnref<const GrBuffer> fIndexBuffer; |
+ sk_sp<GrGeometryProcessor> fGeometryProcessor; |
int fVertexOffset; |
int fInstancesToFlush; |
}; |
@@ -200,13 +200,12 @@ private: |
// Setup GrGeometryProcessor |
GrBatchAtlas* atlas = fAtlas; |
- flushInfo.fGeometryProcessor.reset( |
- GrDistanceFieldPathGeoProc::Create(this->color(), |
- this->viewMatrix(), |
- atlas->getTexture(), |
- params, |
- flags, |
- this->usesLocalCoords())); |
+ flushInfo.fGeometryProcessor = GrDistanceFieldPathGeoProc::Make(this->color(), |
+ this->viewMatrix(), |
+ atlas->getTexture(), |
+ params, |
+ flags, |
+ this->usesLocalCoords()); |
// allocate vertices |
size_t vertexStride = flushInfo.fGeometryProcessor->getVertexStride(); |
@@ -484,7 +483,7 @@ private: |
mesh.initInstanced(kTriangles_GrPrimitiveType, flushInfo->fVertexBuffer, |
flushInfo->fIndexBuffer, flushInfo->fVertexOffset, kVerticesPerQuad, |
kIndicesPerQuad, flushInfo->fInstancesToFlush, maxInstancesPerDraw); |
- target->draw(flushInfo->fGeometryProcessor, mesh); |
+ target->draw(flushInfo->fGeometryProcessor.get(), mesh); |
flushInfo->fVertexOffset += kVerticesPerQuad * flushInfo->fInstancesToFlush; |
flushInfo->fInstancesToFlush = 0; |
} |