From 93f3a66ef6cdede6755a9aa563bc27bcf12cd559 Mon Sep 17 00:00:00 2001 From: "alqahira%ardisson.org" Date: Fri, 25 Feb 2011 19:51:53 +0000 Subject: [PATCH] Bug 556117 - Fix bustage from bug 497056 when building with system libpng. Patch by Mike Hommey , r=glennrp, r=joe, a1.9.0.next=dveditz git-svn-id: svn://10.0.0.236/trunk@261972 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/modules/libpr0n/decoders/png/nsPNGDecoder.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mozilla/modules/libpr0n/decoders/png/nsPNGDecoder.cpp b/mozilla/modules/libpr0n/decoders/png/nsPNGDecoder.cpp index 5b6d72eac0d..e9621f36146 100644 --- a/mozilla/modules/libpr0n/decoders/png/nsPNGDecoder.cpp +++ b/mozilla/modules/libpr0n/decoders/png/nsPNGDecoder.cpp @@ -240,7 +240,7 @@ NS_IMETHODIMP nsPNGDecoder::Init(imgILoad *aLoad) /* Always decode to 24 bit pixdepth */ #ifdef PNG_USER_MEM_SUPPORTED - if (gfxPlatform::GetCMSMode() != eCMSMode_Off) { + if (gfxPlatform::IsCMSEnabled()) { mPNG = png_create_read_struct_2(PNG_LIBPNG_VER_STRING, NULL, error_callback, @@ -277,7 +277,7 @@ NS_IMETHODIMP nsPNGDecoder::Init(imgILoad *aLoad) # if PNG_LIBPNG_VER < 10401 # if defined(PNG_WRITE_SUPPORTED) - if (gfxPlatform::GetCMSMode() != eCMSMode_Off) { + if (gfxPlatform::IsCMSEnabled()) { /* Increase speed of decompressing large iCCP chunks (default buffer size is 8192) */ png_set_compression_buffer_size(mPNG, (png_size_t)32768L); @@ -704,7 +704,7 @@ info_callback(png_structp png_ptr, png_infop info_ptr) #ifdef PNG_USER_MEM_SUPPORTED /* Revert to the default memory allocator */ - if (gfxPlatform::GetCMSMode() != eCMSMode_Off) + if (gfxPlatform::IsCMSEnabled()) png_set_mem_fn(decoder->mPNG, NULL, NULL, NULL); #endif @@ -712,7 +712,7 @@ info_callback(png_structp png_ptr, png_infop info_ptr) # if PNG_LIBPNG_VER < 10401 # if defined(PNG_WRITE_SUPPORTED) /* Revert to the default zlib buffer size */ - if (gfxPlatform::GetCMSMode() != eCMSMode_Off) { + if (gfxPlatform::IsCMSEnabled()) { png_set_compression_buffer_size(decoder->mPNG, (png_size_t)8192); } # endif