aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/images/SkImageDecoder_libwebp.cpp
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2014-06-11 10:33:13 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-06-11 10:33:13 -0700
commit5926b86b90c68bffefbdc8639e41b5bc9102cec6 (patch)
treea20f97bc8a3c5f8224071b23c0b1112f669f05bf /src/images/SkImageDecoder_libwebp.cpp
parentd58a0ba9cff9fcefe5047e88ccb4a6e76c591c40 (diff)
hide SkImageDecoder::Chooser
BUG=skia: R=scroggo@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/331433003
Diffstat (limited to 'src/images/SkImageDecoder_libwebp.cpp')
-rw-r--r--src/images/SkImageDecoder_libwebp.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/images/SkImageDecoder_libwebp.cpp b/src/images/SkImageDecoder_libwebp.cpp
index 8baa10c454..7a3c65875c 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);