aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/android/SkBitmapRegionDecoder.cpp
diff options
context:
space:
mode:
authorGravatar Hal Canary <halcanary@google.com>2016-11-22 14:21:38 -0700
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-11-22 21:23:51 +0000
commita2b4bdce8cfd1a91407595a25683ecff982af22e (patch)
tree2e8fad7d92be4e8a024db784747944d110a80123 /src/android/SkBitmapRegionDecoder.cpp
parent6b77f1cf09f6a3c47a42e29dc28087ac9f9cdb25 (diff)
Revert 248ff023 & 2cb6cb72
Revert "SkImageEncoder: simplify API" This reverts commit 248ff02331d7f73ee4b6c5a7eabeae1080c16cd4. Revert "Fix bug: can't convert nullptr -> bool" This reverts commit 2cb6cb7218171b357bb5c934f032ba69c7b78401. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5151 NOTRY=true Change-Id: I5f6414392d6545f74db0b5bb50608d04f053a8ec Reviewed-on: https://skia-review.googlesource.com/5151 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Hal Canary <halcanary@google.com>
Diffstat (limited to 'src/android/SkBitmapRegionDecoder.cpp')
-rw-r--r--src/android/SkBitmapRegionDecoder.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/android/SkBitmapRegionDecoder.cpp b/src/android/SkBitmapRegionDecoder.cpp
index 8298fb5298..15a530e21a 100644
--- a/src/android/SkBitmapRegionDecoder.cpp
+++ b/src/android/SkBitmapRegionDecoder.cpp
@@ -29,10 +29,11 @@ SkBitmapRegionDecoder* SkBitmapRegionDecoder::Create(
return NULL;
}
- switch ((SkEncodedImageFormat)codec->getEncodedFormat()) {
- case SkEncodedImageFormat::kJPEG:
- case SkEncodedImageFormat::kPNG:
- case SkEncodedImageFormat::kWEBP:
+ SkEncodedFormat format = codec->getEncodedFormat();
+ switch (format) {
+ case SkEncodedFormat::kJPEG_SkEncodedFormat:
+ case SkEncodedFormat::kPNG_SkEncodedFormat:
+ case SkEncodedFormat::kWEBP_SkEncodedFormat:
break;
default:
return nullptr;