Index: src/codec/SkJpegDecoderMgr.cpp |
diff --git a/src/codec/SkJpegDecoderMgr.cpp b/src/codec/SkJpegDecoderMgr.cpp |
index 8517e0dac2ec494315e67eacb8b532efe41655bb..70401c039117dfb20ec13d96ed82ed17bc5eba35 100644 |
--- a/src/codec/SkJpegDecoderMgr.cpp |
+++ b/src/codec/SkJpegDecoderMgr.cpp |
@@ -35,20 +35,25 @@ SkCodec::Result JpegDecoderMgr::returnFailure(const char caller[], SkCodec::Resu |
return result; |
} |
-SkEncodedInfo::Color JpegDecoderMgr::getEncodedColor() { |
+bool JpegDecoderMgr::getEncodedColor(SkEncodedInfo::Color* outColor) { |
switch (fDInfo.jpeg_color_space) { |
case JCS_GRAYSCALE: |
- return SkEncodedInfo::kGray_Color; |
+ *outColor = SkEncodedInfo::kGray_Color; |
+ return true; |
case JCS_YCbCr: |
- return SkEncodedInfo::kYUV_Color; |
+ *outColor = SkEncodedInfo::kYUV_Color; |
+ return true; |
case JCS_RGB: |
- return SkEncodedInfo::kRGB_Color; |
+ *outColor = SkEncodedInfo::kRGB_Color; |
+ return true; |
case JCS_YCCK: |
- return SkEncodedInfo::kYCCK_Color; |
+ *outColor = SkEncodedInfo::kYCCK_Color; |
+ return true; |
case JCS_CMYK: |
- return SkEncodedInfo::kInvertedCMYK_Color; |
+ *outColor = SkEncodedInfo::kInvertedCMYK_Color; |
+ return true; |
default: |
- return SkEncodedInfo::kUnknown_Color; |
+ return false; |
} |
} |