diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-11-24 13:39:42 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-11-24 18:49:04 +0000 |
commit | 9b52b8999be86e5c6e5f5901b2640b16f08a2323 (patch) | |
tree | 218897a0bf04cb0cca2e0840d53378db16dda8db /vcl/qa/cppunit | |
parent | f9588062dd22771395ed8e076f009deb23a0092f (diff) |
Resolves: tdf#95962 incorrect scanline stride
we were reusing the stride of the surface we were cloning,
but the new surface has a different underlying size.
remove the custom stride argument and just change our stride
calculation to use the same scheme that cairo and GDI uses, which
remove another platform/drawing-system variable
Change-Id: I257dac9757b121642e9ccfde7db0911edc9f3fb1
Reviewed-on: https://gerrit.libreoffice.org/20149
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/qa/cppunit')
-rw-r--r-- | vcl/qa/cppunit/BitmapTest.cxx | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/vcl/qa/cppunit/BitmapTest.cxx b/vcl/qa/cppunit/BitmapTest.cxx index c20c12b9926b..33820e467c3b 100644 --- a/vcl/qa/cppunit/BitmapTest.cxx +++ b/vcl/qa/cppunit/BitmapTest.cxx @@ -51,17 +51,12 @@ void BitmapTest::testConvert() { Bitmap::ScopedReadAccess pReadAccess(aBitmap); CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(8), pReadAccess->GetBitCount()); -#if defined WNT - if (!OpenGLHelper::isVCLOpenGLEnabled()) - { - // GDI Scanlines padded to DWORD multiples, it seems - CPPUNIT_ASSERT_EQUAL(static_cast<sal_uLong>(12), pReadAccess->GetScanlineSize()); - } - else +#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 + CPPUNIT_ASSERT_EQUAL(static_cast<sal_uLong>(12), pReadAccess->GetScanlineSize()); #endif - { - CPPUNIT_ASSERT_EQUAL(static_cast<sal_uLong>(10), 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())); |