Index: src/images/SkImageDecoder_wbmp.cpp |
diff --git a/src/images/SkImageDecoder_wbmp.cpp b/src/images/SkImageDecoder_wbmp.cpp |
index db40f595fa74433776784bf3182c454d76aca3a0..8b1659ba8de1d2f505853b6e84aae81c0f379958 100644 |
--- a/src/images/SkImageDecoder_wbmp.cpp |
+++ b/src/images/SkImageDecoder_wbmp.cpp |
@@ -111,20 +111,13 @@ bool SkWBMPImageDecoder::onDecode(SkStream* stream, SkBitmap* decodedBitmap, |
int width = head.fWidth; |
int height = head.fHeight; |
+ decodedBitmap->setConfig(SkBitmap::kIndex8_Config, width, height); |
+ decodedBitmap->setIsOpaque(true); |
+ |
if (SkImageDecoder::kDecodeBounds_Mode == mode) { |
- decodedBitmap->setConfig(SkBitmap::kIndex8_Config, width, height); |
- decodedBitmap->setIsOpaque(true); |
return true; |
} |
- // No Bitmap reuse supported for this format |
- if (!decodedBitmap->isNull()) { |
- return false; |
- } |
- |
- decodedBitmap->setConfig(SkBitmap::kIndex8_Config, width, height); |
- decodedBitmap->setIsOpaque(true); |
- |
const SkPMColor colors[] = { SK_ColorBLACK, SK_ColorWHITE }; |
SkColorTable* ct = SkNEW_ARGS(SkColorTable, (colors, 2)); |
SkAutoUnref aur(ct); |