Test factory uses the inorder draw buffer
BUG=skia:
Review URL: https://codereview.chromium.org/696353002
diff --git a/gm/convexpolyeffect.cpp b/gm/convexpolyeffect.cpp
index e567208..b4206d2 100644
--- a/gm/convexpolyeffect.cpp
+++ b/gm/convexpolyeffect.cpp
@@ -137,14 +137,18 @@
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 @@
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);