diff options
author | Tor Lillqvist <tml@collabora.com> | 2015-03-30 23:28:39 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2015-03-30 23:28:39 +0300 |
commit | 08f9448bd45cf6c6f9679534e7cad9614a4048d6 (patch) | |
tree | 926e0f312fca908a14bb0dc927d6f0510689a210 /vcl | |
parent | 3394ac816a573030feda145dbdabd2a1eabd78c4 (diff) |
Scanlines on Windows seem to be padded to DWORD multiples
Change-Id: I806744fed51f451f17e6f493555f81cc38e2d71e
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/qa/cppunit/BitmapTest.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/vcl/qa/cppunit/BitmapTest.cxx b/vcl/qa/cppunit/BitmapTest.cxx index 98b2e44f0235..c52727bdfa61 100644 --- a/vcl/qa/cppunit/BitmapTest.cxx +++ b/vcl/qa/cppunit/BitmapTest.cxx @@ -44,7 +44,12 @@ void BitmapTest::testConvert() { Bitmap::ScopedReadAccess pReadAccess(aBitmap); CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(8), pReadAccess->GetBitCount()); +#if defined WNT + // Scanlines padded to DWORD multiples, it seems + CPPUNIT_ASSERT_EQUAL(static_cast<sal_uLong>(12), pReadAccess->GetScanlineSize()); +#else CPPUNIT_ASSERT_EQUAL(static_cast<sal_uLong>(10), pReadAccess->GetScanlineSize()); +#endif CPPUNIT_ASSERT(pReadAccess->HasPalette()); const BitmapColor& rColor = pReadAccess->GetPaletteColor(pReadAccess->GetPixelIndex(1, 1)); CPPUNIT_ASSERT_EQUAL(sal_Int32(204), sal_Int32(rColor.GetRed())); @@ -63,8 +68,12 @@ void BitmapTest::testConvert() CPPUNIT_ASSERT_EQUAL(sal_uLong(40), pReadAccess->GetScanlineSize()); #else CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(24), pReadAccess->GetBitCount()); +#if defined WNT + CPPUNIT_ASSERT_EQUAL(sal_uLong(32), pReadAccess->GetScanlineSize()); +#else CPPUNIT_ASSERT_EQUAL(sal_uLong(30), pReadAccess->GetScanlineSize()); #endif +#endif CPPUNIT_ASSERT(!pReadAccess->HasPalette()); Color aColor = pReadAccess->GetPixel(0, 0); CPPUNIT_ASSERT_EQUAL(sal_Int32(204), sal_Int32(aColor.GetRed())); |