aboutsummaryrefslogtreecommitdiff
path: root/www/chromium/files/patch-ui_gfx_codec_jpeg__codec.cc
blob: 1a52a8b4e0362c2ea00d6913402f5970d874e4be (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- ui/gfx/codec/jpeg_codec.cc.orig	2021-03-12 23:57:48 UTC
+++ ui/gfx/codec/jpeg_codec.cc
@@ -208,6 +208,7 @@ bool JPEGCodec::Decode(const unsigned char* input, siz
     case JCS_GRAYSCALE:
     case JCS_RGB:
     case JCS_YCbCr:
+#ifdef JCS_EXTENSIONS
       // Choose an output colorspace and return if it is an unsupported one.
       // Same as JPEGCodec::Encode(), libjpeg-turbo supports all input formats
       // used by Chromium (i.e. RGBA and BGRA) and we just map the input
@@ -224,6 +225,9 @@ bool JPEGCodec::Decode(const unsigned char* input, siz
         NOTREACHED() << "Invalid pixel format";
         return false;
       }
+#else
+      cinfo.out_color_space = JCS_RGB;
+#endif
       break;
     case JCS_CMYK:
     case JCS_YCCK: