Index: src/images/SkImageDecoder_libbmp.cpp |
diff --git a/src/images/SkImageDecoder_libbmp.cpp b/src/images/SkImageDecoder_libbmp.cpp |
index 34a88ac6b00c7a161b5fda7bcdf21ee1002f3779..f9dd2472a0b10b7a45db6e29ae12337f2ec84db4 100644 |
--- a/src/images/SkImageDecoder_libbmp.cpp |
+++ b/src/images/SkImageDecoder_libbmp.cpp |
@@ -123,18 +123,17 @@ bool SkBMPImageDecoder::onDecode(SkStream* stream, SkBitmap* bm, Mode mode) { |
int width = callback.width(); |
int height = callback.height(); |
- SkBitmap::Config config = this->getPrefConfig(k32Bit_SrcDepth, false); |
+ SkColorType colorType = this->getPrefColorType(k32Bit_SrcDepth, false); |
// only accept prefConfig if it makes sense for us |
- if (SkBitmap::kARGB_4444_Config != config && |
- SkBitmap::kRGB_565_Config != config) { |
- config = SkBitmap::kARGB_8888_Config; |
+ if (kARGB_4444_SkColorType != colorType && kRGB_565_SkColorType != colorType) { |
+ colorType = kN32_SkColorType; |
} |
SkScaledBitmapSampler sampler(width, height, getSampleSize()); |
- bm->setConfig(config, sampler.scaledWidth(), sampler.scaledHeight(), 0, |
- kOpaque_SkAlphaType); |
+ bm->setInfo(SkImageInfo::Make(sampler.scaledWidth(), sampler.scaledHeight(), |
+ colorType, kOpaque_SkAlphaType)); |
if (justBounds) { |
return true; |