Index: gm/convexpolyeffect.cpp |
diff --git a/gm/convexpolyeffect.cpp b/gm/convexpolyeffect.cpp |
index 365660d517439ccca1c7ae47f0c702a89b328897..03b9ad25a77029f6a6911dbd3941a2142aa6bdcf 100644 |
--- a/gm/convexpolyeffect.cpp |
+++ b/gm/convexpolyeffect.cpp |
@@ -133,8 +133,8 @@ protected: |
} |
GrDrawState ds; |
- const GrGeometryProcessor* gp = GrDefaultGeoProcFactory::Create(0xff000000); |
- ds.setGeometryProcessor(gp)->unref(); |
+ SkAutoTUnref<const GrGeometryProcessor> gp( |
+ GrDefaultGeoProcFactory::Create(0xff000000)); |
ds.addCoverageProcessor(fp); |
ds.setIdentityViewMatrix(); |
ds.setRenderTarget(rt); |
@@ -150,7 +150,7 @@ protected: |
bounds.toQuad(verts); |
tt.target()->setIndexSourceToBuffer(context->getQuadIndexBuffer()); |
- tt.target()->drawIndexed(&ds, kTriangleFan_GrPrimitiveType, 0, 0, 4, 6); |
+ tt.target()->drawIndexed(&ds, gp, kTriangleFan_GrPrimitiveType, 0, 0, 4, 6); |
x += SkScalarCeilToScalar(path->getBounds().width() + 10.f); |
} |
@@ -190,8 +190,8 @@ protected: |
} |
GrDrawState ds; |
- const GrGeometryProcessor* gp = GrDefaultGeoProcFactory::Create(0xff000000); |
- ds.setGeometryProcessor(gp)->unref(); |
+ SkAutoTUnref<const GrGeometryProcessor> gp( |
+ GrDefaultGeoProcFactory::Create(0xff000000)); |
ds.addCoverageProcessor(fp); |
ds.setIdentityViewMatrix(); |
ds.setRenderTarget(rt); |
@@ -205,7 +205,7 @@ protected: |
bounds.toQuad(verts); |
tt.target()->setIndexSourceToBuffer(context->getQuadIndexBuffer()); |
- tt.target()->drawIndexed(&ds, kTriangleFan_GrPrimitiveType, 0, 0, 4, 6); |
+ tt.target()->drawIndexed(&ds, gp, kTriangleFan_GrPrimitiveType, 0, 0, 4, 6); |
x += SkScalarCeilToScalar(rect.width() + 10.f); |
} |