Remove unused texture coordinate flags.

Currently we support 5 texture stages, each with 5 possible texture coordinate attributes.
However, we only ever use one explicit texture coordinate. This change removes all but one 
(now named just "aTexCoord") of the possible explicit texture coordinates.

Review URL: https://codereview.appspot.com/7308094/


git-svn-id: http://skia.googlecode.com/svn/trunk@7737 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 70db256..8ca74c3 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -312,7 +312,7 @@
         GrTextureParams params(SkShader::kClamp_TileMode, needsFiltering);
         drawState->createTextureEffect(0, clampedTexture, SkMatrix::I(), params);
 
-        static const GrVertexLayout layout = GrDrawState::StageTexCoordVertexLayoutBit(0,0);
+        static const GrVertexLayout layout = GrDrawState::StageTexCoordVertexLayoutBit(0);
         drawState->setVertexLayout(layout);
         GrDrawTarget::AutoReleaseGeometry arg(fGpu, 4, 0);
 
@@ -853,12 +853,7 @@
 #else
     GrDrawState::AutoStageDisable atr(fDrawState);
 
-    const GrRect* srcRects[GrDrawState::kNumStages] = {NULL};
-    const SkMatrix* srcMatrices[GrDrawState::kNumStages] = {NULL};
-    srcRects[0] = &srcRect;
-    srcMatrices[0] = srcMatrix;
-
-    target->drawRect(dstRect, dstMatrix, srcRects, srcMatrices);
+    target->drawRect(dstRect, dstMatrix, &srcRect, srcMatrix, 0);
 #endif
 }
 
@@ -879,7 +874,7 @@
 
     GrVertexLayout layout = 0;
     if (NULL != texCoords) {
-        layout |= GrDrawState::StageTexCoordVertexLayoutBit(0, 0);
+        layout |= GrDrawState::StageTexCoordVertexLayoutBit(0);
     }
     if (NULL != colors) {
         layout |= GrDrawState::kColor_VertexLayoutBit;
@@ -892,20 +887,20 @@
             GrPrintf("Failed to get space for vertices!\n");
             return;
         }
-        int texOffsets[GrDrawState::kMaxTexCoords];
+        int texOffset;
         int colorOffset;
-        GrDrawState::VertexSizeAndOffsetsByIdx(layout,
-                                                texOffsets,
-                                                &colorOffset,
-                                                NULL,
-                                                NULL);
+        GrDrawState::VertexSizeAndOffsets(layout,
+                                          &texOffset,
+                                          &colorOffset,
+                                          NULL,
+                                          NULL);
         void* curVertex = geo.vertices();
 
         for (int i = 0; i < vertexCount; ++i) {
             *((GrPoint*)curVertex) = positions[i];
 
-            if (texOffsets[0] > 0) {
-                *(GrPoint*)((intptr_t)curVertex + texOffsets[0]) = texCoords[i];
+            if (texOffset > 0) {
+                *(GrPoint*)((intptr_t)curVertex + texOffset) = texCoords[i];
             }
             if (colorOffset > 0) {
                 *(GrColor*)((intptr_t)curVertex + colorOffset) = colors[i];