[chromium] Use decoding swizzle only on libjpeg-turbo 1.1.90+
authornoel.gordon@gmail.com <noel.gordon@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 29 Jan 2012 23:59:44 +0000 (23:59 +0000)
committernoel.gordon@gmail.com <noel.gordon@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 29 Jan 2012 23:59:44 +0000 (23:59 +0000)
https://bugs.webkit.org/show_bug.cgi?id=74286

Reviewed by Kenneth Russell.

No new tests. Covered by many existing tests: in particular
    fast/images/*, fast/canvas/*,
    tables/mozilla/bugs/bug29314.html
    tables/mozilla/bugs/bug13169.html
    tables/mozilla/bugs/bug10565.html
    tables/mozilla/bugs/bug11026.html
    fast/repaint/backgroundSizeRepaint.html
    fast/repaint/block-layout-inline-children-replaced.html
    fast/repaint/clipped-relative.html
    fast/repaint/selected-replaced.html
    tables/mozilla/bugs/bug12908-1.html

* platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
(rgbOutputColorSpace): Swizzle decode iff libjpeg-turbo is r732 or above.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106203 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp

index 1cdbae9..ed42617 100644 (file)
@@ -1,3 +1,25 @@
+2012-01-29  Noel Gordon  <noel.gordon@gmail.com>
+
+        [chromium] Use decoding swizzle only on libjpeg-turbo 1.1.90+
+        https://bugs.webkit.org/show_bug.cgi?id=74286
+
+        Reviewed by Kenneth Russell.
+
+        No new tests. Covered by many existing tests: in particular 
+            fast/images/*, fast/canvas/*,
+            tables/mozilla/bugs/bug29314.html
+            tables/mozilla/bugs/bug13169.html
+            tables/mozilla/bugs/bug10565.html
+            tables/mozilla/bugs/bug11026.html
+            fast/repaint/backgroundSizeRepaint.html
+            fast/repaint/block-layout-inline-children-replaced.html
+            fast/repaint/clipped-relative.html
+            fast/repaint/selected-replaced.html
+            tables/mozilla/bugs/bug12908-1.html
+
+        * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
+        (rgbOutputColorSpace): Swizzle decode iff libjpeg-turbo is r732 or above.
+
 2012-01-29  Sheriff Bot  <webkit.review.bot@gmail.com>
 
         Unreviewed, rolling out r105999.
index e70b0af..5b42490 100644 (file)
@@ -69,12 +69,12 @@ extern "C" {
 #define ASSUME_LITTLE_ENDIAN 1
 #endif
 
-#if defined(JCS_EXTENSIONS) && ASSUME_LITTLE_ENDIAN
+#if defined(JCS_ALPHA_EXTENSIONS) && ASSUME_LITTLE_ENDIAN
 #define TURBO_JPEG_RGB_SWIZZLE
 #if USE(SKIA) && (!SK_R32_SHIFT && SK_G32_SHIFT == 8 && SK_B32_SHIFT == 16)
-inline J_COLOR_SPACE rgbOutputColorSpace() { return JCS_EXT_RGBX; }
+inline J_COLOR_SPACE rgbOutputColorSpace() { return JCS_EXT_RGBA; }
 #else
-inline J_COLOR_SPACE rgbOutputColorSpace() { return JCS_EXT_BGRX; }
+inline J_COLOR_SPACE rgbOutputColorSpace() { return JCS_EXT_BGRA; }
 #endif
 inline bool turboSwizzled(J_COLOR_SPACE colorSpace) { return colorSpace == rgbOutputColorSpace(); }
 #else