| Index: src/codec/SkJpegCodec.cpp
|
| diff --git a/src/codec/SkJpegCodec.cpp b/src/codec/SkJpegCodec.cpp
|
| index 50db897a8ee7fb2bc7e26e36407ff93385ddc41c..b834ecbafe5596ead625ffb21b7d8ec7383798f2 100644
|
| --- a/src/codec/SkJpegCodec.cpp
|
| +++ b/src/codec/SkJpegCodec.cpp
|
| @@ -164,11 +164,15 @@ bool SkJpegCodec::setOutputColorSpace(const SkImageInfo& dst) {
|
| return false;
|
| }
|
|
|
| - // Ensure that the alpha type is opaque
|
| - if (kOpaque_SkAlphaType != dst.alphaType()) {
|
| + if (kUnknown_SkAlphaType == dst.alphaType()) {
|
| return false;
|
| }
|
|
|
| + if (kOpaque_SkAlphaType != dst.alphaType()) {
|
| + SkCodecPrintf("Warning: an opaque image should be decoded as opaque "
|
| + "- it is being decoded as non-opaque, which will draw slower\n");
|
| + }
|
| +
|
| // Check if we will decode to CMYK because a conversion to RGBA is not supported
|
| J_COLOR_SPACE colorSpace = fDecoderMgr->dinfo()->jpeg_color_space;
|
| bool isCMYK = JCS_CMYK == colorSpace || JCS_YCCK == colorSpace;
|
|
|