Index: src/codec/SkAndroidCodec.cpp |
diff --git a/src/codec/SkAndroidCodec.cpp b/src/codec/SkAndroidCodec.cpp |
index db365642327cc1041f1dbda911ed2d87c9c57da1..fe96c5a65ff90a8aa8273001f17558a19038de42 100644 |
--- a/src/codec/SkAndroidCodec.cpp |
+++ b/src/codec/SkAndroidCodec.cpp |
@@ -86,7 +86,9 @@ SkColorType SkAndroidCodec::computeOutputColorType(SkColorType requestedColorTyp |
// we allowed clients to request kAlpha_8 when they wanted a |
// grayscale decode. |
case kGray_8_SkColorType: |
- if (kGray_8_SkColorType == suggestedColorType) { |
+ if (kGray_8_SkColorType == suggestedColorType || |
+ kAlpha_8_SkColorType == suggestedColorType) |
+ { |
return kGray_8_SkColorType; |
} |
break; |
@@ -99,9 +101,9 @@ SkColorType SkAndroidCodec::computeOutputColorType(SkColorType requestedColorTyp |
break; |
} |
- // Android has limited support for kGray_8 (using kAlpha_8). We will not |
- // use kGray_8 for Android unless they specifically ask for it. |
- if (kGray_8_SkColorType == suggestedColorType) { |
+ // Android has limited support for kGray_8 and kAlpha_8. We will not use these types for |
+ // Android unless they specifically ask for it. |
+ if (kGray_8_SkColorType == suggestedColorType || kAlpha_8_SkColorType == suggestedColorType) { |
return kN32_SkColorType; |
} |