Stop Tracking const vertex attrib color and coverage using GrDrawState

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




git-svn-id: http://skia.googlecode.com/svn/trunk@4022 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/gl/GrGpuGLShaders.cpp b/src/gpu/gl/GrGpuGLShaders.cpp
index 7687a14..32f021f 100644
--- a/src/gpu/gl/GrGpuGLShaders.cpp
+++ b/src/gpu/gl/GrGpuGLShaders.cpp
@@ -382,6 +382,8 @@
     }
 
     fHWProgramID = 0;
+    fHWConstAttribColor = GrColor_ILLEGAL;
+    fHWConstAttribCoverage = GrColor_ILLEGAL;
 }
 
 void GrGpuGLShaders::flushViewMatrix() {
@@ -607,7 +609,7 @@
     if (this->getVertexLayout() & kColor_VertexLayoutBit) {
         // color will be specified per-vertex as an attribute
         // invalidate the const vertex attrib color
-        fHWDrawState.setColor(GrColor_ILLEGAL);
+        fHWConstAttribColor = GrColor_ILLEGAL;
     } else {
         switch (desc.fColorInput) {
             case ProgramDesc::kAttribute_ColorInput:
@@ -617,7 +619,7 @@
                     float c[] = GR_COLOR_TO_VEC4(color);
                     GL_CALL(VertexAttrib4fv(GrGLProgram::ColorAttributeIdx(), 
                                             c));
-                    fHWDrawState.setColor(color);
+                    fHWConstAttribColor = color;
                 }
                 break;
             case ProgramDesc::kUniform_ColorInput:
@@ -657,7 +659,7 @@
     if (this->getVertexLayout() & kCoverage_VertexLayoutBit) {
         // coverage will be specified per-vertex as an attribute
         // invalidate the const vertex attrib coverage
-        fHWDrawState.setCoverage4(GrColor_ILLEGAL);
+        fHWConstAttribCoverage = GrColor_ILLEGAL;
     } else {
         switch (desc.fCoverageInput) {
             case ProgramDesc::kAttribute_ColorInput:
@@ -667,7 +669,7 @@
                     float c[] = GR_COLOR_TO_VEC4(coverage);
                     GL_CALL(VertexAttrib4fv(GrGLProgram::CoverageAttributeIdx(), 
                                             c));
-                    fHWDrawState.setCoverage(coverage);
+                    fHWConstAttribCoverage = coverage;
                 }
                 break;
             case ProgramDesc::kUniform_ColorInput: