promote SkImage::AlphaType to SkAlphaType

BUG=
R=bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/src@11421 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/image/SkImagePriv.cpp b/image/SkImagePriv.cpp
index 9454272..1e72236 100644
--- a/image/SkImagePriv.cpp
+++ b/image/SkImagePriv.cpp
@@ -14,16 +14,16 @@
     switch (info.fColorType) {
         case SkImage::kAlpha_8_ColorType:
             switch (info.fAlphaType) {
-                case SkImage::kIgnore_AlphaType:
+                case kIgnore_SkAlphaType:
                     // makes no sense
                     return SkBitmap::kNo_Config;
 
-                case SkImage::kOpaque_AlphaType:
+                case kOpaque_SkAlphaType:
                     *isOpaque = true;
                     return SkBitmap::kA8_Config;
 
-                case SkImage::kPremul_AlphaType:
-                case SkImage::kUnpremul_AlphaType:
+                case kPremul_SkAlphaType:
+                case kUnpremul_SkAlphaType:
                     *isOpaque = false;
                     return SkBitmap::kA8_Config;
             }
@@ -34,27 +34,25 @@
             *isOpaque = true;
             return SkBitmap::kRGB_565_Config;
 
-        case SkImage::kRGBA_8888_ColorType:
-        case SkImage::kBGRA_8888_ColorType:
-            // not supported yet
-            return SkBitmap::kNo_Config;
-
         case SkImage::kPMColor_ColorType:
             switch (info.fAlphaType) {
-                case SkImage::kIgnore_AlphaType:
-                case SkImage::kUnpremul_AlphaType:
+                case kIgnore_SkAlphaType:
+                case kUnpremul_SkAlphaType:
                     // not supported yet
                     return SkBitmap::kNo_Config;
-                case SkImage::kOpaque_AlphaType:
+                case kOpaque_SkAlphaType:
                     *isOpaque = true;
                     return SkBitmap::kARGB_8888_Config;
-                case SkImage::kPremul_AlphaType:
+                case kPremul_SkAlphaType:
                     *isOpaque = false;
                     return SkBitmap::kARGB_8888_Config;
             }
             break;
+        
+        default:
+            // break for unsupported colortypes
+            break;
     }
-    SkDEBUGFAIL("how did we get here");
     return SkBitmap::kNo_Config;
 }
 
@@ -91,8 +89,8 @@
 
     info->fWidth = bm.width();
     info->fHeight = bm.height();
-    info->fAlphaType = bm.isOpaque() ? SkImage::kOpaque_AlphaType :
-                                       SkImage::kPremul_AlphaType;
+    info->fAlphaType = bm.isOpaque() ? kOpaque_SkAlphaType :
+                                       kPremul_SkAlphaType;
     return true;
 }
 
diff --git a/image/SkImage_Raster.cpp b/image/SkImage_Raster.cpp
index 3e26856..cd9b70f 100644
--- a/image/SkImage_Raster.cpp
+++ b/image/SkImage_Raster.cpp
@@ -27,7 +27,7 @@
         if ((unsigned)info.fColorType > (unsigned)kLastEnum_ColorType) {
             return false;
         }
-        if ((unsigned)info.fAlphaType > (unsigned)kLastEnum_AlphaType) {
+        if ((unsigned)info.fAlphaType > (unsigned)kLastEnum_SkAlphaType) {
             return false;
         }
 
diff --git a/image/SkSurface_Picture.cpp b/image/SkSurface_Picture.cpp
index 79812c4..915530c 100644
--- a/image/SkSurface_Picture.cpp
+++ b/image/SkSurface_Picture.cpp
@@ -62,7 +62,7 @@
         SkImage::Info info;
         info.fWidth = info.fHeight = 0;
         info.fColorType = SkImage::kPMColor_ColorType;
-        info.fAlphaType = SkImage::kOpaque_AlphaType;
+        info.fAlphaType = kOpaque_SkAlphaType;
         return SkImage::NewRasterCopy(info, NULL, 0);
     }
 }