diff options
Diffstat (limited to 'chromium/third_party/skia/src/images/SkImageDecoder_libico.cpp')
-rw-r--r-- | chromium/third_party/skia/src/images/SkImageDecoder_libico.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/chromium/third_party/skia/src/images/SkImageDecoder_libico.cpp b/chromium/third_party/skia/src/images/SkImageDecoder_libico.cpp index 2b65a36c76f..e6ae16f0bd4 100644 --- a/chromium/third_party/skia/src/images/SkImageDecoder_libico.cpp +++ b/chromium/third_party/skia/src/images/SkImageDecoder_libico.cpp @@ -94,6 +94,7 @@ bool SkICOImageDecoder::onDecode(SkStream* stream, SkBitmap* bm, Mode mode) if (length < (size_t)(6 + count*16)) return false; +#ifdef SK_SUPPORT_LEGACY_IMAGEDECODER_CHOOSER int choice; Chooser* chooser = this->getChooser(); //FIXME:if no chooser, consider providing the largest color image @@ -138,6 +139,9 @@ bool SkICOImageDecoder::onDecode(SkStream* stream, SkBitmap* bm, Mode mode) //you never know what the chooser is going to supply if (choice >= count || choice < 0) return false; +#else + const int choice = 0; // TODO: fold this value into the expressions below +#endif //skip ahead to the correct header //commented out lines are not used, but if i switch to other read method, need to know how many to skip @@ -246,7 +250,7 @@ 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)); + bm->setInfo(SkImageInfo::MakeN32Premul(w, h), calculateRowBytesFor8888(w, bitCount)); if (SkImageDecoder::kDecodeBounds_Mode == mode) { delete[] colors; |