You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
libreoffice/0001-tdf-95450-avoid-double...

92 lines
3.8 KiB

From e1f3d2cce6e2717189ab8a1e85b98f28df05734b Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Tue, 15 Dec 2015 20:46:54 +0100
Subject: [PATCH] tdf#95450 avoid double swap on big endian arches
AFAICS the swapping is already done at basebmp::BitmapDevice level.
Change-Id: Ie82f2610b4415ed11fc1164a54bc1fe183f523ed
---
vcl/headless/svpbmp.cxx | 28 ----------------------------
1 file changed, 28 deletions(-)
diff --git a/vcl/headless/svpbmp.cxx b/vcl/headless/svpbmp.cxx
index e6d962f..a3ff4d7 100644
--- a/vcl/headless/svpbmp.cxx
+++ b/vcl/headless/svpbmp.cxx
@@ -202,17 +202,10 @@ BitmapBuffer* SvpSalBitmap::AcquireBuffer( BitmapAccessMode )
{
nBitCount = 32;
pBuf->mnFormat = BMP_FORMAT_32BIT_TC_MASK;
-#ifdef OSL_BIGENDIAN
- ColorMaskElement aRedMask(0x0000ff00);
- ColorMaskElement aGreenMask(0x00ff0000);
- ColorMaskElement aBlueMask(0xff000000);
- sal_uInt32 nAlphaChannel(0x000000ff);
-#else
ColorMaskElement aRedMask(0x00ff0000);
ColorMaskElement aGreenMask(0x0000ff00);
ColorMaskElement aBlueMask(0x000000ff);
sal_uInt32 nAlphaChannel(0xff000000);
-#endif
aBlueMask.CalcMaskShift();
aRedMask.CalcMaskShift();
aGreenMask.CalcMaskShift();
@@ -223,17 +216,10 @@ BitmapBuffer* SvpSalBitmap::AcquireBuffer( BitmapAccessMode )
{
nBitCount = 32;
pBuf->mnFormat = BMP_FORMAT_32BIT_TC_MASK;
-#ifdef OSL_BIGENDIAN
- ColorMaskElement aRedMask(0x00ff0000);
- ColorMaskElement aGreenMask(0x0000ff00);
- ColorMaskElement aBlueMask(0x000000ff);
- sal_uInt32 nAlphaChannel(0xff000000);
-#else
ColorMaskElement aRedMask(0x0000ff00);
ColorMaskElement aGreenMask(0x00ff0000);
ColorMaskElement aBlueMask(0xff000000);
sal_uInt32 nAlphaChannel(0x000000ff);
-#endif
aBlueMask.CalcMaskShift();
aRedMask.CalcMaskShift();
aGreenMask.CalcMaskShift();
@@ -244,17 +230,10 @@ BitmapBuffer* SvpSalBitmap::AcquireBuffer( BitmapAccessMode )
{
nBitCount = 32;
pBuf->mnFormat = BMP_FORMAT_32BIT_TC_MASK;
-#ifdef OSL_BIGENDIAN
- ColorMaskElement aRedMask(0x000000ff);
- ColorMaskElement aGreenMask(0x0000ff00);
- ColorMaskElement aBlueMask(0x00ff0000);
- sal_uInt32 nAlphaChannel(0xff000000);
-#else
ColorMaskElement aRedMask(0xff000000);
ColorMaskElement aGreenMask(0x00ff0000);
ColorMaskElement aBlueMask(0x0000ff00);
sal_uInt32 nAlphaChannel(0x000000ff);
-#endif
aBlueMask.CalcMaskShift();
aRedMask.CalcMaskShift();
aGreenMask.CalcMaskShift();
@@ -265,17 +244,10 @@ BitmapBuffer* SvpSalBitmap::AcquireBuffer( BitmapAccessMode )
{
nBitCount = 32;
pBuf->mnFormat = BMP_FORMAT_32BIT_TC_MASK;
-#ifdef OSL_BIGENDIAN
- ColorMaskElement aRedMask(0xff000000);
- ColorMaskElement aGreenMask(0x00ff0000);
- ColorMaskElement aBlueMask(0x0000ff00);
- sal_uInt32 nAlphaChannel(0x000000ff);
-#else
ColorMaskElement aRedMask(0x000000ff);
ColorMaskElement aGreenMask(0x0000ff00);
ColorMaskElement aBlueMask(0x00ff0000);
sal_uInt32 nAlphaChannel(0xff000000);
-#endif
aBlueMask.CalcMaskShift();
aRedMask.CalcMaskShift();
aGreenMask.CalcMaskShift();
--
2.5.0