From 341abaff96c61d6b783160936f97f90e0641e225 Mon Sep 17 00:00:00 2001 From: "dolske%mozilla.com" Date: Mon, 24 Dec 2007 05:41:18 +0000 Subject: [PATCH] Bug 409381 - gif images (with transparency) display corrupted. p=swsnyder@insightbb.com, r,sr=vlad, a=blocking-1.9+ --- gfx/thebes/public/gfxColor.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gfx/thebes/public/gfxColor.h b/gfx/thebes/public/gfxColor.h index 6c01a0357d3..bac23b6c70c 100644 --- a/gfx/thebes/public/gfxColor.h +++ b/gfx/thebes/public/gfxColor.h @@ -73,8 +73,13 @@ // Avoid tortured construction of 32-bit ARGB pixel from 3 individual bytes // of memory plus constant 0xFF. RGB bytes are already contiguous! // Equivalent to: GFX_PACKED_PIXEL(0xff,r,g,b) -#define GFX_0XFF_PPIXEL_FROM_BPTR(pbptr) \ - (GFX_BYTESWAP32(*((PRUint32 *)(pbptr))) >> 8) | (0xFF << 24) +#ifndef IS_BIG_ENDIAN +# define GFX_0XFF_PPIXEL_FROM_BPTR(pbptr) \ + (GFX_BYTESWAP32(*((PRUint32 *)(pbptr))) >> 8) | (0xFF << 24) +#else +# define GFX_0XFF_PPIXEL_FROM_BPTR(pbptr) \ + (*((PRUint32 *)(pbptr)) >> 8) | (0xFF << 24) +#endif /* IS_BIG_ENDIAN */ /** * Fast approximate division by 255. It has the property that