Take two for r8466:

Replace the old attribute binding and index interface with one where we include the binding as part of the attribute array. Also removed the fixed attribute indices for constant color and coverage attributes, and replaced with dynamic ones based on current attribute set. Removed binding of color and coverage attributes unless they're actually set.

Original author: bsalomon@google.com

Author: jvanverth@google.com

Reviewed By: bsalomon@google.com,robertphillips@google.com

Review URL: https://chromiumcodereview.appspot.com/13296005


git-svn-id: http://skia.googlecode.com/svn/trunk@8468 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/gl/GrGLProgramDesc.h b/src/gpu/gl/GrGLProgramDesc.h
index df5729f..a77ed71 100644
--- a/src/gpu/gl/GrGLProgramDesc.h
+++ b/src/gpu/gl/GrGLProgramDesc.h
@@ -39,7 +39,8 @@
     void setRandom(SkMWCRandom*,
                    const GrGpuGL* gpu,
                    const GrTexture* dummyDstTexture,
-                   const GrEffectStage stages[GrDrawState::kNumStages]);
+                   const GrEffectStage stages[GrDrawState::kNumStages],
+                   int currAttribIndex);
 
     /**
      * Builds a program descriptor from a GrDrawState. Whether the primitive type is points, the
@@ -76,35 +77,34 @@
         kDualSrcOutputCnt
     };
 
-    // should the FS discard if the coverage is zero (to avoid stencil manipulation)
-    bool                        fDiscardIfZeroCoverage;
-
-    // stripped of bits that don't affect program generation
-    GrAttribBindings            fAttribBindings;
-
     /** Non-zero if this stage has an effect */
     GrGLEffect::EffectKey       fEffectKeys[GrDrawState::kNumStages];
 
-    // To enable experimental geometry shader code (not for use in
-    // production)
-#if GR_GL_EXPERIMENTAL_GS
-    bool                        fExperimentalGS;
-#endif
+    // To enable experimental geometry shader code (not for use in	
+    // production)	 
+#if GR_GL_EXPERIMENTAL_GS	
+    bool                     fExperimentalGS;	
+#endif	
+
     GrGLShaderBuilder::DstReadKey fDstRead;             // set by GrGLShaderBuilder if there
                                                         // are effects that must read the dst.
                                                         // Otherwise, 0.
 
+    // should the FS discard if the coverage is zero (to avoid stencil manipulation)
+    SkBool8                     fDiscardIfZeroCoverage;
+
     uint8_t                     fColorInput;            // casts to enum ColorInput
     uint8_t                     fCoverageInput;         // casts to enum ColorInput
     uint8_t                     fDualSrcOutput;         // casts to enum DualSrcOutput
+
     int8_t                      fFirstCoverageStage;
     SkBool8                     fEmitsPointSize;
     uint8_t                     fColorFilterXfermode;   // casts to enum SkXfermode::Mode
 
     int8_t                      fPositionAttributeIndex;
+    int8_t                      fLocalCoordAttributeIndex;
     int8_t                      fColorAttributeIndex;
     int8_t                      fCoverageAttributeIndex;
-    int8_t                      fLocalCoordsAttributeIndex;
 
     // GrGLProgram and GrGLShaderBuilder read the private fields to generate code. TODO: Move all
     // code generation to GrGLShaderBuilder (and maybe add getters rather than friending).