Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(480)

Unified Diff: src/images/SkImageDecoder_libico.cpp

Issue 331433003: hide SkImageDecoder::Chooser (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/images/SkImageDecoder_libgif.cpp ('k') | src/images/SkImageDecoder_libjpeg.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/images/SkImageDecoder_libico.cpp
diff --git a/src/images/SkImageDecoder_libico.cpp b/src/images/SkImageDecoder_libico.cpp
index c6dd6f08367c8253ee08a6a3aee30859c4a441d7..e6ae16f0bd4c2cc73b79e4df94883412d85733c0 100644
--- a/src/images/SkImageDecoder_libico.cpp
+++ b/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();
scroggo 2014/06/11 17:11:23 ICO is the prime example where the choice actually
//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
« no previous file with comments | « src/images/SkImageDecoder_libgif.cpp ('k') | src/images/SkImageDecoder_libjpeg.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698