Index: src/codec/SkCodecPriv.h |
diff --git a/src/codec/SkCodecPriv.h b/src/codec/SkCodecPriv.h |
index 235c4e24aff3bcbc56787487824170c33f6fd4fa..5d66118943b19717c288adbc29bed1b7ed4d4e7e 100644 |
--- a/src/codec/SkCodecPriv.h |
+++ b/src/codec/SkCodecPriv.h |
@@ -136,7 +136,12 @@ inline bool conversion_possible(const SkImageInfo& dst, const SkImageInfo& src) |
case kN32_SkColorType: |
return true; |
case kRGB_565_SkColorType: |
- return src.alphaType() == kOpaque_SkAlphaType; |
+ return kOpaque_SkAlphaType == dst.alphaType(); |
+ case kGray_8_SkColorType: |
+ if (kOpaque_SkAlphaType != dst.alphaType()) { |
+ return false; |
+ } |
+ // Fall through |
default: |
return dst.colorType() == src.colorType(); |
} |