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

Unified Diff: src/images/SkImageDecoder_libwebp.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
Index: src/images/SkImageDecoder_libwebp.cpp
diff --git a/src/images/SkImageDecoder_libwebp.cpp b/src/images/SkImageDecoder_libwebp.cpp
index 8baa10c454ec1d94db72690383f5829a62f4b6d1..7a3c65875c18191730838bba29d5e576d67eb90a 100644
--- a/src/images/SkImageDecoder_libwebp.cpp
+++ b/src/images/SkImageDecoder_libwebp.cpp
@@ -292,9 +292,11 @@ bool SkWEBPImageDecoder::setDecodeConfig(SkBitmap* decodedBitmap, int width, int
}
}
+#ifdef SK_SUPPORT_LEGACY_IMAGEDECODER_CHOOSER
if (!this->chooseFromOneChoice(colorType, width, height)) {
return false;
}
+#endif
SkAlphaType alphaType = kOpaque_SkAlphaType;
if (SkToBool(fHasAlpha)) {
@@ -379,12 +381,14 @@ bool SkWEBPImageDecoder::onDecodeSubset(SkBitmap* decodedBitmap,
if (!allocResult) {
return return_false(*decodedBitmap, "allocPixelRef");
}
+#ifdef SK_SUPPORT_LEGACY_IMAGEDECODER_CHOOSER
} else {
// This is also called in setDecodeConfig in above block.
// i.e., when bitmap->isNull() is true.
if (!chooseFromOneChoice(bitmap->colorType(), width, height)) {
return false;
}
+#endif
}
SkAutoLockPixels alp(*bitmap);

Powered by Google App Engine
This is Rietveld 408576698