Ensure all vertex attributes (except zero that we always use) are disabled after a resetContext.

Review URL: http://codereview.appspot.com/5309043/


git-svn-id: http://skia.googlecode.com/svn/trunk@2494 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrGLProgram.h b/src/gpu/GrGLProgram.h
index dafa79d..783ebf6 100644
--- a/src/gpu/GrGLProgram.h
+++ b/src/gpu/GrGLProgram.h
@@ -61,7 +61,7 @@
      void overrideBlend(GrBlendCoeff* srcCoeff, GrBlendCoeff* dstCoeff) const;
 
     /**
-     * Attribute indices
+     * Attribute indices. These should not overlap. Matrices consume 3 slots.
      */
     static int PositionAttributeIdx() { return 0; }
     static int TexCoordAttributeIdx(int tcIdx) { return 1 + tcIdx; }
@@ -72,10 +72,10 @@
     static int EdgeAttributeIdx() { return 3 + GrDrawTarget::kMaxTexCoords; }
 
     static int ViewMatrixAttributeIdx() {
-        return 2 + GrDrawTarget::kMaxTexCoords;
+        return 4 + GrDrawTarget::kMaxTexCoords;
     }
     static int TextureMatrixAttributeIdx(int stage) {
-        return 5 + GrDrawTarget::kMaxTexCoords + 3 * stage;
+        return 7 + GrDrawTarget::kMaxTexCoords + 3 * stage;
     }
 
 private: