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

Unified Diff: gm/convexpolyeffect.cpp

Issue 761563002: First step to moving vertex attributes to the geometryProcessor (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: adding test to ignore Created 6 years 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') | include/gpu/GrTypesPriv.h » ('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 8ee4a5db6f1312e04fa310d9d2333e492a9977cd..1e5c6017ca93e38ff1dc9532d4ca56083b68853f 100644
--- a/gm/convexpolyeffect.cpp
+++ b/gm/convexpolyeffect.cpp
@@ -133,13 +133,15 @@ protected:
}
GrDrawState ds;
- ds.setGeometryProcessor(GrDefaultGeoProcFactory::Create(false))->unref();
+ const GrGeometryProcessor* gp = GrDefaultGeoProcFactory::Create();
+ ds.setGeometryProcessor(gp)->unref();
ds.addCoverageProcessor(fp);
ds.setIdentityViewMatrix();
ds.setRenderTarget(rt);
ds.setColor(0xff000000);
- GrDrawTarget::AutoReleaseGeometry geo(tt.target(), 4, ds.getVertexStride(), 0);
+ GrDrawTarget::AutoReleaseGeometry geo(tt.target(), 4, gp->getVertexStride(), 0);
+ SkASSERT(gp->getVertexStride() == sizeof(SkPoint));
SkPoint* verts = reinterpret_cast<SkPoint*>(geo.vertices());
SkRect bounds = p.getBounds();
@@ -189,13 +191,15 @@ protected:
}
GrDrawState ds;
- ds.setGeometryProcessor(GrDefaultGeoProcFactory::Create(false))->unref();
+ const GrGeometryProcessor* gp = GrDefaultGeoProcFactory::Create();
+ ds.setGeometryProcessor(gp)->unref();
ds.addCoverageProcessor(fp);
ds.setIdentityViewMatrix();
ds.setRenderTarget(rt);
ds.setColor(0xff000000);
- GrDrawTarget::AutoReleaseGeometry geo(tt.target(), 4, ds.getVertexStride(), 0);
+ GrDrawTarget::AutoReleaseGeometry geo(tt.target(), 4, gp->getVertexStride(), 0);
+ SkASSERT(gp->getVertexStride() == sizeof(SkPoint));
SkPoint* verts = reinterpret_cast<SkPoint*>(geo.vertices());
SkRect bounds = rect;
« no previous file with comments | « gm/beziereffects.cpp ('k') | include/gpu/GrTypesPriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698