Index: src/images/SkImageEncoder_argb.cpp |
diff --git a/src/images/SkImageEncoder_argb.cpp b/src/images/SkImageEncoder_argb.cpp |
index 97b741b8bf1d1717c31397f25e58ce6482a6ac59..296491eef81864ce0c7f48ec0af7b99c1f25f7be 100644 |
--- a/src/images/SkImageEncoder_argb.cpp |
+++ b/src/images/SkImageEncoder_argb.cpp |
@@ -71,15 +71,15 @@ static void Index8_To_ARGB(const uint8_t* in, uint8_t* argb, int width, |
} |
} |
-static ScanlineImporter ChooseImporter(const SkBitmap::Config& config) { |
- switch (config) { |
- case SkBitmap::kARGB_8888_Config: |
+static ScanlineImporter ChooseImporter(SkColorType ct) { |
+ switch (ct) { |
+ case kN32_SkColorType: |
return ARGB_8888_To_ARGB; |
- case SkBitmap::kRGB_565_Config: |
+ case kRGB_565_SkColorType: |
return RGB_565_To_ARGB; |
- case SkBitmap::kARGB_4444_Config: |
+ case kARGB_4444_SkColorType: |
return ARGB_4444_To_ARGB; |
- case SkBitmap::kIndex8_Config: |
+ case kIndex_8_SkColorType: |
return Index8_To_ARGB; |
default: |
return NULL; |
@@ -87,8 +87,7 @@ static ScanlineImporter ChooseImporter(const SkBitmap::Config& config) { |
} |
bool SkARGBImageEncoder::onEncode(SkWStream* stream, const SkBitmap& bitmap, int) { |
- const SkBitmap::Config config = bitmap.config(); |
- const ScanlineImporter scanline_import = ChooseImporter(config); |
+ const ScanlineImporter scanline_import = ChooseImporter(bitmap.colorType()); |
if (NULL == scanline_import) { |
return false; |
} |