Make GrPaint have a variable sized array of color and coverage stages rather than a fixed size.

R=robertphillips@google.com, jvanverth@google.com

Author: bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@10062 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrDrawState.cpp b/src/gpu/GrDrawState.cpp
index 7c68543..ab800d2 100644
--- a/src/gpu/GrDrawState.cpp
+++ b/src/gpu/GrDrawState.cpp
@@ -32,16 +32,12 @@
     fColorStages.reset();
     fCoverageStages.reset();
 
-    for (int i = 0; i < GrPaint::kMaxColorStages; ++i) {
-        if (paint.isColorStageEnabled(i)) {
-            fColorStages.push_back(paint.getColorStage(i));
-        }
+    for (int i = 0; i < paint.numColorStages(); ++i) {
+        fColorStages.push_back(paint.getColorStage(i));
     }
 
-    for (int i = 0; i < GrPaint::kMaxCoverageStages; ++i) {
-        if (paint.isCoverageStageEnabled(i)) {
-            fCoverageStages.push_back(paint.getCoverageStage(i));
-        }
+    for (int i = 0; i < paint.numCoverageStages(); ++i) {
+        fCoverageStages.push_back(paint.getCoverageStage(i));
     }
 
     this->setRenderTarget(rt);