Index: src/codec/SkJpegCodec.cpp |
diff --git a/src/codec/SkJpegCodec.cpp b/src/codec/SkJpegCodec.cpp |
index 8d32f2b44d36f400756ce5ab7a60ff052168b420..0799e813813d719fdcb0ba6561daa689ed3d3bde 100644 |
--- a/src/codec/SkJpegCodec.cpp |
+++ b/src/codec/SkJpegCodec.cpp |
@@ -350,18 +350,23 @@ bool SkJpegCodec::setOutputColorSpace(const SkImageInfo& dst) { |
// Check for valid color types and set the output color space |
switch (dst.colorType()) { |
- case kN32_SkColorType: |
+ case kRGBA_8888_SkColorType: |
if (isCMYK) { |
fDecoderMgr->dinfo()->out_color_space = JCS_CMYK; |
} else { |
#ifdef LIBJPEG_TURBO_VERSION |
- // Check the byte ordering of the RGBA color space for the |
- // current platform |
- #ifdef SK_PMCOLOR_IS_RGBA |
fDecoderMgr->dinfo()->out_color_space = JCS_EXT_RGBA; |
- #else |
+#else |
+ fDecoderMgr->dinfo()->out_color_space = JCS_RGB; |
+#endif |
+ } |
+ return true; |
+ case kBGRA_8888_SkColorType: |
+ if (isCMYK) { |
+ fDecoderMgr->dinfo()->out_color_space = JCS_CMYK; |
+ } else { |
+#ifdef LIBJPEG_TURBO_VERSION |
fDecoderMgr->dinfo()->out_color_space = JCS_EXT_BGRA; |
- #endif |
#else |
fDecoderMgr->dinfo()->out_color_space = JCS_RGB; |
#endif |