diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2020-01-30 14:32:15 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2020-02-03 12:48:26 +0100 |
commit | 56a89f475570d6937e8e2b9d00a72a19c2dd7665 (patch) | |
tree | d5c91ad8fc956d407379c822f11c3bd6b48ee19d | |
parent | 4a9ef85e6522ba7b6ef02f97572094eb29c70bd5 (diff) |
fix incorrect Skia scanline test in vcl_bitmap_test
Change-Id: Ia485601a08e2c0093e802c175041b76f94cbbb63
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87848
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
-rw-r--r-- | vcl/qa/cppunit/BitmapTest.cxx | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/vcl/qa/cppunit/BitmapTest.cxx b/vcl/qa/cppunit/BitmapTest.cxx index 0ce45cf5641b..b61ad88265e9 100644 --- a/vcl/qa/cppunit/BitmapTest.cxx +++ b/vcl/qa/cppunit/BitmapTest.cxx @@ -378,22 +378,24 @@ void BitmapTest::testConvert() // 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 + if (SkiaHelper::isVCLSkiaEnabled()) // aligned to 4 bytes + CPPUNIT_ASSERT_EQUAL(sal_uInt32(32), pReadAccess->GetScanlineSize()); + else #if HAVE_FEATURE_OPENGL - if (OpenGLHelper::isVCLOpenGLEnabled()) + if (OpenGLHelper::isVCLOpenGLEnabled()) CPPUNIT_ASSERT_EQUAL(sal_uInt32(30), pReadAccess->GetScanlineSize()); else #endif +#if defined LINUX || defined FREEBSD + { CPPUNIT_ASSERT_EQUAL(sal_uInt32(32), pReadAccess->GetScanlineSize()); -#else -#if defined(_WIN32) - if (!OpenGLHelper::isVCLOpenGLEnabled()) + } +#elif defined(_WIN32) { // GDI Scanlines padded to DWORD multiples, it seems CPPUNIT_ASSERT_EQUAL(sal_uInt32(32), pReadAccess->GetScanlineSize()); } - else -#endif +#else { CPPUNIT_ASSERT_EQUAL(sal_uInt32(30), pReadAccess->GetScanlineSize()); } |