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); |