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

Unified Diff: tests/ImageDecodingTest.cpp

Issue 1018953003: Add SkEncodedFormat, used by SkCodec. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Use a common enum for SkImageEncoder and SkImageDecoder and SkCodec Created 5 years, 9 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: tests/ImageDecodingTest.cpp
diff --git a/tests/ImageDecodingTest.cpp b/tests/ImageDecodingTest.cpp
index b94e29c11d6fd6b7464dc6d4f787c2bf1b21b769..07ba5f6b370c8cd61098ac43809132d346b9d723 100644
--- a/tests/ImageDecodingTest.cpp
+++ b/tests/ImageDecodingTest.cpp
@@ -44,26 +44,26 @@ static SkPMColor premultiply_unpmcolor(SkPMColor c) {
* Return true if this stream format should be skipped, due
* to do being an opaque format or not a valid format.
*/
-static bool skip_image_format(SkImageDecoder::Format format) {
+static bool skip_image_format(SkEncodedFormat format) {
switch (format) {
- case SkImageDecoder::kPNG_Format:
- case SkImageDecoder::kWEBP_Format:
+ case kPNG_SkEncodedFormat:
+ case kWEBP_SkEncodedFormat:
return false;
// Skip unknown since it will not be decoded anyway.
- case SkImageDecoder::kUnknown_Format:
+ case kUnknown_SkEncodedFormat:
// Technically ICO and BMP supports alpha channels, but our image
// decoders do not, so skip them as well.
- case SkImageDecoder::kICO_Format:
- case SkImageDecoder::kBMP_Format:
+ case kICO_SkEncodedFormat:
+ case kBMP_SkEncodedFormat:
// KTX and ASTC are texture formats so it's not particularly clear how to
// decode the alpha from them.
- case SkImageDecoder::kKTX_Format:
- case SkImageDecoder::kASTC_Format:
+ case kKTX_SkEncodedFormat:
+ case kASTC_SkEncodedFormat:
// The rest of these are opaque.
- case SkImageDecoder::kPKM_Format:
- case SkImageDecoder::kWBMP_Format:
- case SkImageDecoder::kGIF_Format:
- case SkImageDecoder::kJPEG_Format:
+ case kPKM_SkEncodedFormat:
+ case kWBMP_SkEncodedFormat:
+ case kGIF_SkEncodedFormat:
+ case kJPEG_SkEncodedFormat:
return true;
}
SkASSERT(false);
@@ -81,7 +81,7 @@ static void compare_unpremul(skiatest::Reporter* reporter, const SkString& filen
SkFILEStream stream(filename.c_str());
- SkImageDecoder::Format format = SkImageDecoder::GetStreamFormat(&stream);
+ SkEncodedFormat format = SkImageDecoder::GetStreamFormat(&stream);
if (skip_image_format(format)) {
return;
}

Powered by Google App Engine
This is Rietveld 408576698