summaryrefslogtreecommitdiffstats
path: root/firefox4-libjpeg-turbo.patch
blob: 3aadec4ad37428a4b8f5a8c112b9ef5ca29ca18f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
--- mozilla-central/modules/libpr0n/decoders/nsJPEGDecoder.cpp.jpeg-turbo	2010-11-04 21:06:43.000000000 +0100
+++ mozilla-central/modules/libpr0n/decoders/nsJPEGDecoder.cpp	2010-11-06 10:46:04.081880464 +0100
@@ -411,14 +411,6 @@
       return; /* I/O suspension */
     }
 
-    /* Force to use our YCbCr to Packed RGB converter when possible */
-    if (!mTransform && (gfxPlatform::GetCMSMode() != eCMSMode_All) &&
-        mInfo.jpeg_color_space == JCS_YCbCr && mInfo.out_color_space == JCS_RGB) {
-      /* Special case for the most common case: transform from YCbCr direct into packed ARGB */
-      mInfo.out_color_components = 4; /* Packed ARGB pixels are always 4 bytes...*/
-      mInfo.cconvert->color_convert = ycc_rgb_convert_argb;
-    }
-
     /* If this is a progressive JPEG ... */
     mState = mInfo.buffered_image ? JPEG_DECOMPRESS_PROGRESSIVE : JPEG_DECOMPRESS_SEQUENTIAL;
   }
@@ -563,15 +555,6 @@
       PRUint32 *imageRow = ((PRUint32*)mImageData) +
                            (mInfo.output_scanline * mInfo.output_width);
 
-      if (mInfo.cconvert->color_convert == ycc_rgb_convert_argb) {
-        /* Special case: scanline will be directly converted into packed ARGB */
-        if (jpeg_read_scanlines(&mInfo, (JSAMPARRAY)&imageRow, 1) != 1) {
-          *suspend = PR_TRUE; /* suspend */
-          break;
-        }
-        continue; /* all done for this row! */
-      }
-
       JSAMPROW sampleRow = (JSAMPROW)imageRow;
       if (mInfo.output_components == 3) {
         /* Put the pixels at end of row to enable in-place expansion */