Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(363)

Unified Diff: gm/convexpolyeffect.cpp

Issue 696353002: Test factory uses the inorder draw buffer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/beziereffects.cpp ('k') | src/gpu/GrTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « gm/beziereffects.cpp ('k') | src/gpu/GrTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698