separate arrays for color and coverage effects.

R=robertphillips@google.com

Review URL: https://codereview.chromium.org/16180006

git-svn-id: http://skia.googlecode.com/svn/trunk@9465 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/gl/GrGpuGL_program.cpp b/src/gpu/gl/GrGpuGL_program.cpp
index 5dab982..5da8ecf 100644
--- a/src/gpu/gl/GrGpuGL_program.cpp
+++ b/src/gpu/gl/GrGpuGL_program.cpp
@@ -84,7 +84,8 @@
 }
 
 GrGLProgram* GrGpuGL::ProgramCache::getProgram(const GrGLProgramDesc& desc,
-                                               const GrEffectStage* stages[]) {
+                                               const GrEffectStage* colorStages[],
+                                               const GrEffectStage* coverageStages[]) {
 #ifdef PROGRAM_CACHE_STATS
     ++fTotalRequests;
 #endif
@@ -119,7 +120,7 @@
 #ifdef PROGRAM_CACHE_STATS
         ++fCacheMisses;
 #endif
-        GrGLProgram* program = GrGLProgram::Create(fGL, desc, stages);
+        GrGLProgram* program = GrGLProgram::Create(fGL, desc, colorStages, coverageStages);
         if (NULL == program) {
             return NULL;
         }
@@ -273,7 +274,8 @@
             return false;
         }
 
-        const GrEffectStage* stages[GrDrawState::kNumStages];
+        SkSTArray<8, const GrEffectStage*, true> colorStages;
+        SkSTArray<8, const GrEffectStage*, true> coverageStages;
         GrGLProgramDesc desc;
         GrGLProgramDesc::Build(this->getDrawState(),
                                kDrawPoints_DrawType == type,
@@ -282,10 +284,13 @@
                                dstCoeff,
                                this,
                                dstCopy,
-                               stages,
+                               &colorStages,
+                               &coverageStages,
                                &desc);
 
-        fCurrentProgram.reset(fProgramCache->getProgram(desc, stages));
+        fCurrentProgram.reset(fProgramCache->getProgram(desc,
+                                                        colorStages.begin(),
+                                                        coverageStages.begin()));
         if (NULL == fCurrentProgram.get()) {
             GrAssert(!"Failed to create program!");
             return false;
@@ -301,7 +306,12 @@
         fCurrentProgram->overrideBlend(&srcCoeff, &dstCoeff);
         this->flushBlend(kDrawLines_DrawType == type, srcCoeff, dstCoeff);
 
-        fCurrentProgram->setData(this, blendOpts, stages, dstCopy, &fSharedGLProgramState);
+        fCurrentProgram->setData(this,
+                                 blendOpts,
+                                 colorStages.begin(),
+                                 coverageStages.begin(),
+                                 dstCopy,
+                                 &fSharedGLProgramState);
     }
     this->flushStencil(type);
     this->flushScissor();