Index: src/images/SkImageDecoder_libgif.cpp |
diff --git a/src/images/SkImageDecoder_libgif.cpp b/src/images/SkImageDecoder_libgif.cpp |
index f6c54c2dc0fa8016fe1444ff48833ce454ca9da6..d368eccd92d629537ae7b8cedf68b1dc29d81970 100644 |
--- a/src/images/SkImageDecoder_libgif.cpp |
+++ b/src/images/SkImageDecoder_libgif.cpp |
@@ -202,17 +202,11 @@ bool SkGIFImageDecoder::onDecode(SkStream* sk_stream, SkBitmap* bm, Mode mode) { |
return error_return(gif, *bm, "chooseFromOneChoice"); |
} |
+ bm->setConfig(SkBitmap::kIndex8_Config, width, height); |
if (SkImageDecoder::kDecodeBounds_Mode == mode) { |
- bm->setConfig(SkBitmap::kIndex8_Config, width, height); |
return true; |
} |
- // No Bitmap reuse supported for this format |
- if (!bm->isNull()) { |
- return false; |
- } |
- |
- bm->setConfig(SkBitmap::kIndex8_Config, width, height); |
SavedImage* image = &gif->SavedImages[gif->ImageCount-1]; |
const GifImageDesc& desc = image->ImageDesc; |