Patch8: chromium_useragent.patch.in
Patch9: system-expat.patch
Patch10: dlopen-sonames.patch
+# https://bugs.gentoo.org/show_bug.cgi?id=393471
+# libjpeg-turbo >= 1.1.90 supports that feature
+# but there is no autodetection currently, so revert for now
+Patch11: chromium-revert-jpeg-swizzle-r0.patch
URL: http://www.chromium.org/Home
%{?with_gconf:BuildRequires: GConf2-devel}
BuildRequires: OpenGL-GLU-devel
%patch9 -p1
cd ..
%patch10 -p1
+cd src
+%patch11 -p0
+cd ..
cd src
sh -x clean-source.sh %{!?with_system_v8:v8=0} %{!?with_nacl:nacl=0}
--- /dev/null
+This reverts http://trac.webkit.org/changeset/101286
+to fix Gentoo bug https://bugs.gentoo.org/show_bug.cgi?id=393471
+
+Index: third_party/WebKit/Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp
+===================================================================
+--- third_party/WebKit/Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp (revision 96970)
++++ third_party/WebKit/Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp (revision 101286)
+@@ -63,20 +63,6 @@
+
+ #include <setjmp.h>
+
+-#if CPU(BIG_ENDIAN) || CPU(MIDDLE_ENDIAN)
+-#define ASSUME_LITTLE_ENDIAN 0
+-#else
+-#define ASSUME_LITTLE_ENDIAN 1
+-#endif
+-
+-#if defined(JCS_EXTENSIONS) && ASSUME_LITTLE_ENDIAN
+-#define TURBO_JPEG_RGB_SWIZZLE
+-inline J_COLOR_SPACE rgbOutputColorSpace() { return JCS_EXT_BGRX; }
+-inline bool turboSwizzled(J_COLOR_SPACE colorSpace) { return colorSpace == rgbOutputColorSpace(); }
+-#else
+-inline J_COLOR_SPACE rgbOutputColorSpace() { return JCS_RGB; }
+-#endif
+-
+ namespace WebCore {
+
+ struct decoder_error_mgr {
+@@ -235,11 +221,10 @@
+ // their color profile, CoreGraphics will "upsample" them
+ // again, resulting in horizontal distortions.
+ m_decoder->setIgnoreGammaAndColorProfile(true);
+- m_info.out_color_space = JCS_RGB;
+- break;
++ // Note fall-through!
+ case JCS_RGB:
+ case JCS_YCbCr:
+- m_info.out_color_space = rgbOutputColorSpace();
++ m_info.out_color_space = JCS_RGB;
+ break;
+ case JCS_CMYK:
+ case JCS_YCCK:
+@@ -496,19 +481,6 @@
+ }
+
+ jpeg_decompress_struct* info = m_reader->info();
+-
+-#if !ENABLE(IMAGE_DECODER_DOWN_SAMPLING) && defined(TURBO_JPEG_RGB_SWIZZLE)
+- if (turboSwizzled(info->out_color_space)) {
+- ASSERT(!m_scaled);
+- while (info->output_scanline < info->output_height) {
+- unsigned char* row = reinterpret_cast<unsigned char*>(buffer.getAddr(0, info->output_scanline));
+- if (jpeg_read_scanlines(info, &row, 1) != 1)
+- return false;
+- }
+- return true;
+- }
+-#endif
+-
+ JSAMPARRAY samples = m_reader->samples();
+
+ while (info->output_scanline < info->output_height) {