Make GrGLShaderBuilder::TextureSampler extract only required info from GrTextureAccess.

This will make it possible to init a TextureSampler without a texture or a specific config.

Also unify two separate bitfields of color components in GPU code.
Review URL: https://codereview.chromium.org/13121002

git-svn-id: http://skia.googlecode.com/svn/trunk@8428 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrDrawState.cpp b/src/gpu/GrDrawState.cpp
index e108999..f9e12cc 100644
--- a/src/gpu/GrDrawState.cpp
+++ b/src/gpu/GrDrawState.cpp
@@ -236,7 +236,7 @@
         validComponentFlags = 0;
         color = 0; // not strictly necessary but we get false alarms from tools about uninit.
     } else {
-        validComponentFlags = GrEffect::kAll_ValidComponentFlags;
+        validComponentFlags = kRGBA_GrColorComponentFlags;
         color = this->getColor();
     }
 
@@ -275,7 +275,7 @@
             }
         }
     }
-    return (GrEffect::kA_ValidComponentFlag & validComponentFlags) && 0xff == GrColorUnpackA(color);
+    return (kA_GrColorComponentFlag & validComponentFlags) && 0xff == GrColorUnpackA(color);
 }
 
 bool GrDrawState::hasSolidCoverage(GrAttribBindings bindings) const {
@@ -291,7 +291,7 @@
         validComponentFlags = 0;
     } else {
         coverage = fCommon.fCoverage;
-        validComponentFlags = GrEffect::kAll_ValidComponentFlags;
+        validComponentFlags = kRGBA_GrColorComponentFlags;
     }
 
     // Run through the coverage stages and see if the coverage will be all ones at the end.
@@ -301,7 +301,7 @@
             (*effect)->getConstantColorComponents(&coverage, &validComponentFlags);
         }
     }
-    return (GrEffect::kAll_ValidComponentFlags == validComponentFlags)  && (0xffffffff == coverage);
+    return (kRGBA_GrColorComponentFlags == validComponentFlags)  && (0xffffffff == coverage);
 }
 
 ////////////////////////////////////////////////////////////////////////////////