Index: src/images/SkImageDecoder_libico.cpp |
diff --git a/src/images/SkImageDecoder_libico.cpp b/src/images/SkImageDecoder_libico.cpp |
index 195b6ff08b9338ee4c4502b4efb6f5b5a2c31785..6335136fa0a037566f91e957004af5242a5b04d6 100644 |
--- a/src/images/SkImageDecoder_libico.cpp |
+++ b/src/images/SkImageDecoder_libico.cpp |
@@ -232,16 +232,12 @@ bool SkICOImageDecoder::onDecode(SkStream* stream, SkBitmap* bm, Mode mode) |
//if the andbitmap (mask) is all zeroes, then we can easily do an index bitmap |
//however, with small images with large colortables, maybe it's better to still do argb_8888 |
+ bm->setConfig(SkBitmap::kARGB_8888_Config, w, h, calculateRowBytesFor8888(w, bitCount)); |
+ |
if (SkImageDecoder::kDecodeBounds_Mode == mode) { |
- bm->setConfig(SkBitmap::kARGB_8888_Config, w, h, calculateRowBytesFor8888(w, bitCount)); |
delete[] colors; |
return true; |
} |
- // No Bitmap reuse supported for this format |
- if (!bm->isNull()) { |
- return false; |
- } |
- bm->setConfig(SkBitmap::kARGB_8888_Config, w, h, calculateRowBytesFor8888(w, bitCount)); |
if (!this->allocPixelRef(bm, NULL)) |
{ |