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

Unified Diff: src/codec/SkJpegDecoderMgr.cpp

Issue 1820073002: Add SkEncodedInfo to report properties of encoded image data (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Order of param eval bug Created 4 years, 8 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
« no previous file with comments | « src/codec/SkJpegDecoderMgr.h ('k') | src/codec/SkPngCodec.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkJpegDecoderMgr.cpp
diff --git a/src/codec/SkJpegDecoderMgr.cpp b/src/codec/SkJpegDecoderMgr.cpp
index 63228bb58501000476f4888c01a4abe1656e09a2..8517e0dac2ec494315e67eacb8b532efe41655bb 100644
--- a/src/codec/SkJpegDecoderMgr.cpp
+++ b/src/codec/SkJpegDecoderMgr.cpp
@@ -35,12 +35,20 @@ SkCodec::Result JpegDecoderMgr::returnFailure(const char caller[], SkCodec::Resu
return result;
}
-SkColorType JpegDecoderMgr::getColorType() {
+SkEncodedInfo::Color JpegDecoderMgr::getEncodedColor() {
switch (fDInfo.jpeg_color_space) {
case JCS_GRAYSCALE:
- return kGray_8_SkColorType;
+ return SkEncodedInfo::kGray_Color;
+ case JCS_YCbCr:
+ return SkEncodedInfo::kYUV_Color;
+ case JCS_RGB:
+ return SkEncodedInfo::kRGB_Color;
+ case JCS_YCCK:
+ return SkEncodedInfo::kYCCK_Color;
+ case JCS_CMYK:
+ return SkEncodedInfo::kInvertedCMYK_Color;
default:
- return kN32_SkColorType;
+ return SkEncodedInfo::kUnknown_Color;
}
}
« no previous file with comments | « src/codec/SkJpegDecoderMgr.h ('k') | src/codec/SkPngCodec.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698