Index: gm/convexpolyeffect.cpp |
diff --git a/gm/convexpolyeffect.cpp b/gm/convexpolyeffect.cpp |
index e567208c1e9e7e674ba24e3d4fa9f8ae6b7331f9..b4206d27080c4eae7ee4ed4f5a5b3e562eee7dd4 100644 |
--- a/gm/convexpolyeffect.cpp |
+++ b/gm/convexpolyeffect.cpp |
@@ -137,14 +137,18 @@ protected: |
drawState->setRenderTarget(rt); |
drawState->setColor(0xff000000); |
- SkPoint verts[4]; |
+ // TODO hack |
+ GrDrawTarget::AutoReleaseGeometry geo(tt.target(), 4, 0); |
+ SkPoint* verts = reinterpret_cast<SkPoint*>(geo.vertices()); |
+ |
+ //SkPoint verts[4]; |
SkRect bounds = p.getBounds(); |
// Make sure any artifacts around the exterior of path are visible by using overly |
// conservative bounding geometry. |
bounds.outset(5.f, 5.f); |
bounds.toQuad(verts); |
- tt.target()->setVertexSourceToArray(verts, 4); |
+ //tt.target()->setVertexSourceToArray(verts, 4); |
tt.target()->setIndexSourceToBuffer(context->getQuadIndexBuffer()); |
tt.target()->drawIndexed(kTriangleFan_GrPrimitiveType, 0, 0, 4, 6); |
@@ -191,12 +195,16 @@ protected: |
drawState->setRenderTarget(rt); |
drawState->setColor(0xff000000); |
- SkPoint verts[4]; |
+ // TODO hack |
+ GrDrawTarget::AutoReleaseGeometry geo(tt.target(), 4, 0); |
+ SkPoint* verts = reinterpret_cast<SkPoint*>(geo.vertices()); |
+ |
+ //SkPoint verts[4]; |
SkRect bounds = rect; |
bounds.outset(5.f, 5.f); |
bounds.toQuad(verts); |
- tt.target()->setVertexSourceToArray(verts, 4); |
+ //tt.target()->setVertexSourceToArray(verts, 4); |
tt.target()->setIndexSourceToBuffer(context->getQuadIndexBuffer()); |
tt.target()->drawIndexed(kTriangleFan_GrPrimitiveType, 0, 0, 4, 6); |