diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2018-03-14 01:07:07 +1100 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2018-03-16 09:51:36 +0100 |
commit | 460f39e687393b3a8906d2adc3e8f7a0c749851a (patch) | |
tree | fca98d7209b06616357934eb62c11057b8743a8e /vcl/qa | |
parent | 09d842887d7fe6bc7854290f8d87c50fa48e6d4e (diff) |
tdf#116213 OS X and OpenGL bitmap scaline sizes are not 32-bit aligned
Change-Id: I92b43ae2f034bf63cc3f212ec8728c5c6b5e8934
Reviewed-on: https://gerrit.libreoffice.org/51222
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'vcl/qa')
-rw-r--r-- | vcl/qa/cppunit/BitmapTest.cxx | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/vcl/qa/cppunit/BitmapTest.cxx b/vcl/qa/cppunit/BitmapTest.cxx index f835c7b78bc3..0bbe6d294882 100644 --- a/vcl/qa/cppunit/BitmapTest.cxx +++ b/vcl/qa/cppunit/BitmapTest.cxx @@ -342,15 +342,8 @@ void BitmapTest::testConvert() { Bitmap::ScopedReadAccess pReadAccess(aBitmap); CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(8), pReadAccess->GetBitCount()); -#if defined MACOSX || defined IOS - //it would be nice to find and change the stride for quartz to be the same as everyone else - CPPUNIT_ASSERT_EQUAL(static_cast<sal_uLong>(10), pReadAccess->GetScanlineSize()); -#else -#if HAVE_FEATURE_OPENGL - if (!OpenGLHelper::isVCLOpenGLEnabled()) - CPPUNIT_ASSERT_EQUAL(static_cast<sal_uLong>(12), pReadAccess->GetScanlineSize()); -#endif -#endif + // scanline should pad to 32-bit multiples + CPPUNIT_ASSERT_EQUAL(static_cast<sal_uLong>(12), pReadAccess->GetScanlineSize()); CPPUNIT_ASSERT(pReadAccess->HasPalette()); const BitmapColor& rColor = pReadAccess->GetPaletteColor(pReadAccess->GetPixelIndex(1, 1)); CPPUNIT_ASSERT_EQUAL(sal_Int32(204), sal_Int32(rColor.GetRed())); @@ -365,22 +358,8 @@ void BitmapTest::testConvert() Bitmap::ScopedReadAccess pReadAccess(aBitmap); // 24 bit Bitmap on SVP backend can now use 24bit RGB everywhere. CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(24), pReadAccess->GetBitCount()); - -#if defined LINUX || defined FREEBSD + // scanline should pad to 32-bit multiples CPPUNIT_ASSERT_EQUAL(sal_uLong(32), pReadAccess->GetScanlineSize()); -#else -#if defined(_WIN32) - if (!OpenGLHelper::isVCLOpenGLEnabled()) - { - // GDI Scanlines padded to DWORD multiples, it seems - CPPUNIT_ASSERT_EQUAL(sal_uLong(32), pReadAccess->GetScanlineSize()); - } - else -#endif - { - CPPUNIT_ASSERT_EQUAL(sal_uLong(30), pReadAccess->GetScanlineSize()); - } -#endif CPPUNIT_ASSERT(!pReadAccess->HasPalette()); Color aColor = pReadAccess->GetPixel(0, 0).GetColor(); |