Simplify vertex layout bitfields by making Position-as-texcoords the
default.

http://codereview.appspot.com/6337050/



git-svn-id: http://skia.googlecode.com/svn/trunk@4321 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/gl/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp
index f16812b..8b8a954 100644
--- a/src/gpu/gl/GrGLProgram.cpp
+++ b/src/gpu/gl/GrGLProgram.cpp
@@ -592,13 +592,11 @@
 
                 const char* inCoords;
                 // figure out what our input coords are
-                if (GrDrawTarget::StagePosAsTexCoordVertexLayoutBit(s) &
-                    layout) {
+                int tcIdx = GrDrawTarget::VertexTexCoordsForStage(s, layout);
+                if (tcIdx < 0) {
                     inCoords = POS_ATTR_NAME;
                 } else {
-                    int tcIdx = GrDrawTarget::VertexTexCoordsForStage(s, layout);
-                     // we better have input tex coordinates if stage is enabled.
-                    GrAssert(tcIdx >= 0);
+                    // must have input tex coordinates if stage is enabled.
                     GrAssert(texCoordAttrs[tcIdx].size());
                     inCoords = texCoordAttrs[tcIdx].c_str();
                 }
@@ -713,15 +711,13 @@
 
                     const char* inCoords;
                     // figure out what our input coords are
-                    if (GrDrawTarget::StagePosAsTexCoordVertexLayoutBit(s) &
-                        layout) {
+                    int tcIdx =
+                        GrDrawTarget::VertexTexCoordsForStage(s, layout);
+                    if (tcIdx < 0) {
                         inCoords = POS_ATTR_NAME;
                     } else {
-                        int tcIdx =
-                            GrDrawTarget::VertexTexCoordsForStage(s, layout);
-                        // we better have input tex coordinates if stage is
+                        // must have input tex coordinates if stage is
                         // enabled.
-                        GrAssert(tcIdx >= 0);
                         GrAssert(texCoordAttrs[tcIdx].size());
                         inCoords = texCoordAttrs[tcIdx].c_str();
                     }