]>
Commit | Line | Data |
---|---|---|
1347c76c AM |
1 | This reverts http://trac.webkit.org/changeset/101286 |
2 | to fix Gentoo bug https://bugs.gentoo.org/show_bug.cgi?id=393471 | |
3 | ||
4 | Index: third_party/WebKit/Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp | |
5 | =================================================================== | |
6 | --- third_party/WebKit/Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp (revision 96970) | |
7 | +++ third_party/WebKit/Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp (revision 101286) | |
8 | @@ -63,20 +63,6 @@ | |
9 | ||
10 | #include <setjmp.h> | |
11 | ||
12 | -#if CPU(BIG_ENDIAN) || CPU(MIDDLE_ENDIAN) | |
13 | -#define ASSUME_LITTLE_ENDIAN 0 | |
14 | -#else | |
15 | -#define ASSUME_LITTLE_ENDIAN 1 | |
16 | -#endif | |
17 | - | |
18 | -#if defined(JCS_EXTENSIONS) && ASSUME_LITTLE_ENDIAN | |
19 | -#define TURBO_JPEG_RGB_SWIZZLE | |
20 | -inline J_COLOR_SPACE rgbOutputColorSpace() { return JCS_EXT_BGRX; } | |
21 | -inline bool turboSwizzled(J_COLOR_SPACE colorSpace) { return colorSpace == rgbOutputColorSpace(); } | |
22 | -#else | |
23 | -inline J_COLOR_SPACE rgbOutputColorSpace() { return JCS_RGB; } | |
24 | -#endif | |
25 | - | |
26 | namespace WebCore { | |
27 | ||
28 | struct decoder_error_mgr { | |
29 | @@ -235,11 +221,10 @@ | |
30 | // their color profile, CoreGraphics will "upsample" them | |
31 | // again, resulting in horizontal distortions. | |
32 | m_decoder->setIgnoreGammaAndColorProfile(true); | |
33 | - m_info.out_color_space = JCS_RGB; | |
34 | - break; | |
35 | + // Note fall-through! | |
36 | case JCS_RGB: | |
37 | case JCS_YCbCr: | |
38 | - m_info.out_color_space = rgbOutputColorSpace(); | |
39 | + m_info.out_color_space = JCS_RGB; | |
40 | break; | |
41 | case JCS_CMYK: | |
42 | case JCS_YCCK: | |
43 | @@ -496,19 +481,6 @@ | |
44 | } | |
45 | ||
46 | jpeg_decompress_struct* info = m_reader->info(); | |
47 | - | |
48 | -#if !ENABLE(IMAGE_DECODER_DOWN_SAMPLING) && defined(TURBO_JPEG_RGB_SWIZZLE) | |
49 | - if (turboSwizzled(info->out_color_space)) { | |
50 | - ASSERT(!m_scaled); | |
51 | - while (info->output_scanline < info->output_height) { | |
52 | - unsigned char* row = reinterpret_cast<unsigned char*>(buffer.getAddr(0, info->output_scanline)); | |
53 | - if (jpeg_read_scanlines(info, &row, 1) != 1) | |
54 | - return false; | |
55 | - } | |
56 | - return true; | |
57 | - } | |
58 | -#endif | |
59 | - | |
60 | JSAMPARRAY samples = m_reader->samples(); | |
61 | ||
62 | while (info->output_scanline < info->output_height) { |