fix test failures on big endian arches

f41
David Tardon 9 years ago
parent 85ff9ac054
commit e4456fe557

@ -0,0 +1,91 @@
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

@ -249,6 +249,7 @@ Patch11: 0001-but-only-for-dialog.patch
Patch12: 0001-impress-s-AnnotationWindow-is-the-only-user-of-WB_NE.patch
Patch13: 0002-remove-newly-unused-WB_NEEDSFOCUS-and-fragile-FLOAT_.patch
Patch14: 0003-gtk3-wayland-start-floating-windows-hidden.patch
Patch15: 0001-tdf-95450-avoid-double-swap-on-big-endian-arches.patch
%define instdir %{_libdir}
%define baseinstdir %{instdir}/libreoffice
@ -942,9 +943,6 @@ git commit -q -a -m 'add Red Hat colors to palette'
git am %{patches}
sed -i -e /CppunitTest_sw_ooxmlimport/d sw/Module_sw.mk
# fails on all secondary platforms
sed -i -e /CppunitTest_vcl_outdev/d vcl/Module_vcl.mk
sed -i -e /CppunitTest_vcl_bitmap_test/d vcl/Module_vcl.mk
git commit -q -a -m 'temporarily disable failing tests'
%ifarch %{arm}

Loading…
Cancel
Save