This cl moves color and coverage off of drawstate. In an effort to keep this CL manageable, I have left the compute invariant input / output in a bit of a strange state(fixing this will be complicated).
In addition, NVPR makes this very complicated, and I haven't quite figured out a good way to handle it, so for now color and coverage DO live on optstate, but I will figure out some way to refactor that in future CLs.
BUG=skia:
Review URL: https://codereview.chromium.org/783763002
diff --git a/gm/convexpolyeffect.cpp b/gm/convexpolyeffect.cpp
index 1e5c601..365660d 100644
--- a/gm/convexpolyeffect.cpp
+++ b/gm/convexpolyeffect.cpp
@@ -133,12 +133,11 @@
}
GrDrawState ds;
- const GrGeometryProcessor* gp = GrDefaultGeoProcFactory::Create();
+ const GrGeometryProcessor* gp = GrDefaultGeoProcFactory::Create(0xff000000);
ds.setGeometryProcessor(gp)->unref();
ds.addCoverageProcessor(fp);
ds.setIdentityViewMatrix();
ds.setRenderTarget(rt);
- ds.setColor(0xff000000);
GrDrawTarget::AutoReleaseGeometry geo(tt.target(), 4, gp->getVertexStride(), 0);
SkASSERT(gp->getVertexStride() == sizeof(SkPoint));
@@ -191,12 +190,11 @@
}
GrDrawState ds;
- const GrGeometryProcessor* gp = GrDefaultGeoProcFactory::Create();
+ const GrGeometryProcessor* gp = GrDefaultGeoProcFactory::Create(0xff000000);
ds.setGeometryProcessor(gp)->unref();
ds.addCoverageProcessor(fp);
ds.setIdentityViewMatrix();
ds.setRenderTarget(rt);
- ds.setColor(0xff000000);
GrDrawTarget::AutoReleaseGeometry geo(tt.target(), 4, gp->getVertexStride(), 0);
SkASSERT(gp->getVertexStride() == sizeof(SkPoint));