diff options
author | Hal Canary <halcanary@google.com> | 2016-11-22 14:21:38 -0700 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-11-22 21:23:51 +0000 |
commit | a2b4bdce8cfd1a91407595a25683ecff982af22e (patch) | |
tree | 2e8fad7d92be4e8a024db784747944d110a80123 /dm/DM.cpp | |
parent | 6b77f1cf09f6a3c47a42e29dc28087ac9f9cdb25 (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 'dm/DM.cpp')
-rw-r--r-- | dm/DM.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -524,17 +524,17 @@ static void push_codec_srcs(Path path) { nativeModes.push_back(CodecSrc::kCodec_Mode); nativeModes.push_back(CodecSrc::kCodecZeroInit_Mode); switch (codec->getEncodedFormat()) { - case SkEncodedImageFormat::kJPEG: + case SkEncodedFormat::kJPEG_SkEncodedFormat: nativeModes.push_back(CodecSrc::kScanline_Mode); nativeModes.push_back(CodecSrc::kStripe_Mode); nativeModes.push_back(CodecSrc::kCroppedScanline_Mode); supportsNativeScaling = true; break; - case SkEncodedImageFormat::kWEBP: + case SkEncodedFormat::kWEBP_SkEncodedFormat: nativeModes.push_back(CodecSrc::kSubset_Mode); supportsNativeScaling = true; break; - case SkEncodedImageFormat::kDNG: + case SkEncodedFormat::kDNG_SkEncodedFormat: break; default: nativeModes.push_back(CodecSrc::kScanline_Mode); @@ -547,7 +547,7 @@ static void push_codec_srcs(Path path) { switch (codec->getInfo().colorType()) { case kGray_8_SkColorType: colorTypes.push_back(CodecSrc::kGrayscale_Always_DstColorType); - if (SkEncodedImageFormat::kWBMP == codec->getEncodedFormat()) { + if (kWBMP_SkEncodedFormat == codec->getEncodedFormat()) { colorTypes.push_back(CodecSrc::kIndex8_Always_DstColorType); } break; @@ -640,15 +640,15 @@ static void push_codec_srcs(Path path) { push_image_gen_src(path, ImageGenSrc::kCodec_Mode, alphaType, false); #if defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS) - if (SkEncodedImageFormat::kWEBP != codec->getEncodedFormat() && - SkEncodedImageFormat::kWBMP != codec->getEncodedFormat() && + if (kWEBP_SkEncodedFormat != codec->getEncodedFormat() && + kWBMP_SkEncodedFormat != codec->getEncodedFormat() && kUnpremul_SkAlphaType != alphaType) { push_image_gen_src(path, ImageGenSrc::kPlatform_Mode, alphaType, false); } #elif defined(SK_BUILD_FOR_WIN) - if (SkEncodedImageFormat::kWEBP != codec->getEncodedFormat() && - SkEncodedImageFormat::kWBMP != codec->getEncodedFormat()) + if (kWEBP_SkEncodedFormat != codec->getEncodedFormat() && + kWBMP_SkEncodedFormat != codec->getEncodedFormat()) { push_image_gen_src(path, ImageGenSrc::kPlatform_Mode, alphaType, false); } |