Move vertex layout definitions from GrDrawTarget to GrDrawState.
This is the first step in revising vertex layouts so that the currently
installed GrEffects determine the current vertex layout.
https://codereview.appspot.com/7235051/
git-svn-id: http://skia.googlecode.com/svn/trunk@7423 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/gl/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp
index e6daa9c..2aa7236 100644
--- a/src/gpu/gl/GrGLProgram.cpp
+++ b/src/gpu/gl/GrGLProgram.cpp
@@ -225,7 +225,7 @@
bool GrGLProgram::genEdgeCoverage(SkString* coverageVar,
GrGLShaderBuilder* builder) const {
- if (fDesc.fVertexLayout & GrDrawTarget::kEdge_VertexLayoutBit) {
+ if (fDesc.fVertexLayout & GrDrawState::kEdge_VertexLayoutBit) {
const char *vsName, *fsName;
builder->addVarying(kVec4f_GrSLType, "Edge", &vsName, &fsName);
builder->fVSAttrs.push_back().set(kVec4f_GrSLType,
@@ -587,7 +587,7 @@
// add texture coordinates that are used to the list of vertex attr decls
SkString texCoordAttrs[GrDrawState::kMaxTexCoords];
for (int t = 0; t < GrDrawState::kMaxTexCoords; ++t) {
- if (GrDrawTarget::VertexUsesTexCoordIdx(t, layout)) {
+ if (GrDrawState::VertexUsesTexCoordIdx(t, layout)) {
tex_attr_name(t, texCoordAttrs + t);
builder.fVSAttrs.push_back().set(kVec2f_GrSLType,
GrGLShaderVar::kAttribute_TypeModifier,
@@ -611,7 +611,7 @@
const char* inCoords;
// figure out what our input coords are
- int tcIdx = GrDrawTarget::VertexTexCoordsForStage(s, layout);
+ int tcIdx = GrDrawState::VertexTexCoordsForStage(s, layout);
if (tcIdx < 0) {
inCoords = builder.positionAttribute().c_str();
} else {
@@ -708,7 +708,7 @@
const char* inCoords;
// figure out what our input coords are
int tcIdx =
- GrDrawTarget::VertexTexCoordsForStage(s, layout);
+ GrDrawState::VertexTexCoordsForStage(s, layout);
if (tcIdx < 0) {
inCoords = builder.positionAttribute().c_str();
} else {