From 54435d6221d3de6cd3c6af98be527d6ac5f2bbef Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 8 Sep 2010 17:27:38 +0200 Subject: firefox4-4.0-0.8.beta5 + sync patches with rawhide --- mozilla-libjpeg-turbo.patch | 54 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 mozilla-libjpeg-turbo.patch (limited to 'mozilla-libjpeg-turbo.patch') diff --git a/mozilla-libjpeg-turbo.patch b/mozilla-libjpeg-turbo.patch new file mode 100644 index 0000000..9abd0e9 --- /dev/null +++ b/mozilla-libjpeg-turbo.patch @@ -0,0 +1,54 @@ +diff -up xulrunner-1.9.3.0/mozilla-central/modules/libpr0n/decoders/jpeg/nsJPEGDecoder.cpp.jpeg-turbo xulrunner-1.9.3.0/mozilla-central/modules/libpr0n/decoders/jpeg/nsJPEGDecoder.cpp +--- xulrunner-1.9.3.0/mozilla-central/modules/libpr0n/decoders/jpeg/nsJPEGDecoder.cpp.jpeg-turbo 2010-08-06 03:09:15.000000000 +0200 ++++ xulrunner-1.9.3.0/mozilla-central/modules/libpr0n/decoders/jpeg/nsJPEGDecoder.cpp 2010-08-16 11:19:17.000000000 +0200 +@@ -58,19 +58,6 @@ + + extern "C" { + #include "iccjpeg.h" +- +-/* Colorspace conversion (copied from jpegint.h) */ +-struct jpeg_color_deconverter { +- JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); +- JMETHOD(void, color_convert, (j_decompress_ptr cinfo, +- JSAMPIMAGE input_buf, JDIMENSION input_row, +- JSAMPARRAY output_buf, int num_rows)); +-}; +- +-METHODDEF(void) +-ycc_rgb_convert_argb (j_decompress_ptr cinfo, +- JSAMPIMAGE input_buf, JDIMENSION input_row, +- JSAMPARRAY output_buf, int num_rows); + } + + NS_IMPL_ISUPPORTS1(nsJPEGDecoder, imgIDecoder) +@@ -443,14 +430,6 @@ nsresult nsJPEGDecoder::Write(const char + return NS_OK; /* 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; + } +@@ -616,15 +595,6 @@ nsJPEGDecoder::OutputScanlines(PRBool* s + 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 */ -- cgit