Use explicitly-sized enums in GrGLProgramDesc::KeyHeader

Uses enums explicitly sized to 8 bits in GrGLProgramDesc::KeyHeader,
instead of storing them as uint8_t values. This avoids the need to
static_cast them.

R=bsalomon@google.com

Author: cdalton@nvidia.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11560 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp
index 10380f7..fe17f88 100644
--- a/tests/GLProgramsTest.cpp
+++ b/tests/GLProgramsTest.cpp
@@ -44,7 +44,8 @@
     // if the effects have used up all off the available attributes,
     // don't try to use color or coverage attributes as input
     do {
-        header->fColorInput = random->nextULessThan(kColorInputCnt);
+        header->fColorInput = static_cast<GrGLProgramDesc::ColorInput>(
+                                  random->nextULessThan(kColorInputCnt));
     } while (GrDrawState::kMaxVertexAttribCnt <= currAttribIndex &&
              kAttribute_ColorInput == header->fColorInput);
     header->fColorAttributeIndex = (header->fColorInput == kAttribute_ColorInput) ?
@@ -52,14 +53,16 @@
                                         -1;
 
     do {
-        header->fCoverageInput = random->nextULessThan(kColorInputCnt);
+        header->fCoverageInput = static_cast<GrGLProgramDesc::ColorInput>(
+                                     random->nextULessThan(kColorInputCnt));
     } while (GrDrawState::kMaxVertexAttribCnt <= currAttribIndex  &&
              kAttribute_ColorInput == header->fCoverageInput);
     header->fCoverageAttributeIndex = (header->fCoverageInput == kAttribute_ColorInput) ?
                                         currAttribIndex++ :
                                         -1;
 
-    header->fColorFilterXfermode = random->nextULessThan(SkXfermode::kLastCoeffMode + 1);
+    header->fColorFilterXfermode = static_cast<SkXfermode::Mode>(
+                                       random->nextULessThan(SkXfermode::kLastCoeffMode + 1));
 
 #if GR_GL_EXPERIMENTAL_GS
     header->fExperimentalGS = gpu->caps()->geometryShaderSupport() && random->nextBool();