Index: gm/convexpolyeffect.cpp |
diff --git a/gm/convexpolyeffect.cpp b/gm/convexpolyeffect.cpp |
index 13659476bad22e2f2cc5ae62a49097a446f43a14..3f8ae09a1afeceb0e29bceffc6e7bef4b286ed09 100644 |
--- a/gm/convexpolyeffect.cpp |
+++ b/gm/convexpolyeffect.cpp |
@@ -58,8 +58,8 @@ private: |
Color color(this->color()); |
Coverage coverage(Coverage::kSolid_Type); |
LocalCoords localCoords(LocalCoords::kUnused_Type); |
- SkAutoTUnref<const GrGeometryProcessor> gp( |
- GrDefaultGeoProcFactory::Create(color, coverage, localCoords, SkMatrix::I())); |
+ sk_sp<GrGeometryProcessor> gp( |
+ GrDefaultGeoProcFactory::Make(color, coverage, localCoords, SkMatrix::I())); |
size_t vertexStride = gp->getVertexStride(); |
SkASSERT(vertexStride == sizeof(SkPoint)); |
@@ -71,7 +71,7 @@ private: |
fRect.toQuad(verts); |
- helper.recordDraw(target, gp); |
+ helper.recordDraw(target, gp.get()); |
} |
SkRect fRect; |
@@ -173,15 +173,14 @@ protected: |
path->transform(m, &p); |
GrPrimitiveEdgeType edgeType = (GrPrimitiveEdgeType) et; |
- SkAutoTUnref<GrFragmentProcessor> fp(GrConvexPolyEffect::Create(edgeType, p)); |
+ sk_sp<GrFragmentProcessor> fp(GrConvexPolyEffect::Make(edgeType, p)); |
if (!fp) { |
continue; |
} |
GrPipelineBuilder pipelineBuilder; |
- pipelineBuilder.setXPFactory( |
- GrPorterDuffXPFactory::Create(SkXfermode::kSrc_Mode))->unref(); |
- pipelineBuilder.addCoverageFragmentProcessor(fp); |
+ pipelineBuilder.setXPFactory(GrPorterDuffXPFactory::Make(SkXfermode::kSrc_Mode)); |
+ pipelineBuilder.addCoverageFragmentProcessor(std::move(fp)); |
SkAutoTUnref<GrDrawBatch> batch(new PolyBoundsBatch(p.getBounds(), 0xff000000)); |
@@ -213,15 +212,14 @@ protected: |
SkRect rect = *iter.get(); |
rect.offset(x, y); |
GrPrimitiveEdgeType edgeType = (GrPrimitiveEdgeType) et; |
- SkAutoTUnref<GrFragmentProcessor> fp(GrConvexPolyEffect::Create(edgeType, rect)); |
+ sk_sp<GrFragmentProcessor> fp(GrConvexPolyEffect::Make(edgeType, rect)); |
if (!fp) { |
continue; |
} |
GrPipelineBuilder pipelineBuilder; |
- pipelineBuilder.setXPFactory( |
- GrPorterDuffXPFactory::Create(SkXfermode::kSrc_Mode))->unref(); |
- pipelineBuilder.addCoverageFragmentProcessor(fp); |
+ pipelineBuilder.setXPFactory(GrPorterDuffXPFactory::Make(SkXfermode::kSrc_Mode)); |
+ pipelineBuilder.addCoverageFragmentProcessor(std::move(fp)); |
SkAutoTUnref<GrDrawBatch> batch(new PolyBoundsBatch(rect, 0xff000000)); |