From 56a89f475570d6937e8e2b9d00a72a19c2dd7665 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Thu, 30 Jan 2020 14:32:15 +0100 Subject: [PATCH] fix incorrect Skia scanline test in vcl_bitmap_test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ia485601a08e2c0093e802c175041b76f94cbbb63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87848 Tested-by: Jenkins Reviewed-by: Luboš Luňák --- vcl/qa/cppunit/BitmapTest.cxx | 16 +++++++++------- 1 file 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(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()); }