Gentoo Archives: gentoo-commits

From: "PaweA Hajdan (phajdan.jr)" <phajdan.jr@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in www-client/chromium/files: chromium-revert-jpeg-swizzle-r0.patch
Date: Wed, 28 Dec 2011 19:01:45
Message-Id: 20111228190134.F001F2004B@flycatcher.gentoo.org
1 phajdan.jr 11/12/28 19:01:34
2
3 Added: chromium-revert-jpeg-swizzle-r0.patch
4 Log:
5 Revert WebKit changeset responsible for Gentoo bug #393471 (bug reported by floppym, useful input by Julien Sanchez, Dan, Siarhei Siamashka, and excellent comments by DRC, the developer of libjpeg-turbo). Remove old.
6
7 (Portage version: 2.1.10.41/cvs/Linux i686)
8
9 Revision Changes Path
10 1.1 www-client/chromium/files/chromium-revert-jpeg-swizzle-r0.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/files/chromium-revert-jpeg-swizzle-r0.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/files/chromium-revert-jpeg-swizzle-r0.patch?rev=1.1&content-type=text/plain
14
15 Index: chromium-revert-jpeg-swizzle-r0.patch
16 ===================================================================
17 This reverts http://trac.webkit.org/changeset/101286
18 to fix Gentoo bug https://bugs.gentoo.org/show_bug.cgi?id=393471
19
20 Index: third_party/WebKit/Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp
21 ===================================================================
22 --- third_party/WebKit/Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp (revision 96970)
23 +++ third_party/WebKit/Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp (revision 101286)
24 @@ -63,20 +63,6 @@
25
26 #include <setjmp.h>
27
28 -#if CPU(BIG_ENDIAN) || CPU(MIDDLE_ENDIAN)
29 -#define ASSUME_LITTLE_ENDIAN 0
30 -#else
31 -#define ASSUME_LITTLE_ENDIAN 1
32 -#endif
33 -
34 -#if defined(JCS_EXTENSIONS) && ASSUME_LITTLE_ENDIAN
35 -#define TURBO_JPEG_RGB_SWIZZLE
36 -inline J_COLOR_SPACE rgbOutputColorSpace() { return JCS_EXT_BGRX; }
37 -inline bool turboSwizzled(J_COLOR_SPACE colorSpace) { return colorSpace == rgbOutputColorSpace(); }
38 -#else
39 -inline J_COLOR_SPACE rgbOutputColorSpace() { return JCS_RGB; }
40 -#endif
41 -
42 namespace WebCore {
43
44 struct decoder_error_mgr {
45 @@ -235,11 +221,10 @@
46 // their color profile, CoreGraphics will "upsample" them
47 // again, resulting in horizontal distortions.
48 m_decoder->setIgnoreGammaAndColorProfile(true);
49 - m_info.out_color_space = JCS_RGB;
50 - break;
51 + // Note fall-through!
52 case JCS_RGB:
53 case JCS_YCbCr:
54 - m_info.out_color_space = rgbOutputColorSpace();
55 + m_info.out_color_space = JCS_RGB;
56 break;
57 case JCS_CMYK:
58 case JCS_YCCK:
59 @@ -496,19 +481,6 @@
60 }
61
62 jpeg_decompress_struct* info = m_reader->info();
63 -
64 -#if !ENABLE(IMAGE_DECODER_DOWN_SAMPLING) && defined(TURBO_JPEG_RGB_SWIZZLE)
65 - if (turboSwizzled(info->out_color_space)) {
66 - ASSERT(!m_scaled);
67 - while (info->output_scanline < info->output_height) {
68 - unsigned char* row = reinterpret_cast<unsigned char*>(buffer.getAddr(0, info->output_scanline));
69 - if (jpeg_read_scanlines(info, &row, 1) != 1)
70 - return false;
71 - }
72 - return true;
73 - }
74 -#endif
75 -
76 JSAMPARRAY samples = m_reader->samples();
77
78 while (info->output_scanline < info->output_height) {