From 21734247d58a6e915b058d8fa55ece949d049613 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 10 Jan 2023 12:56:58 +0200 Subject: drop internal support for 1-bit images on modern hardware, these are less efficient than regular alpha channels. Also, this greatly simplies the range of stuff that vcl needs to deal with, which will make the upcoming transparency->alpha patch easier to deal with. Enhance vcl::CreateFromData to convert incoming 1-bit data to 8-bit image. Change-Id: I35829da750029fe373d0d2911a669d10bab6ad23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145321 Tested-by: Jenkins Reviewed-by: Noel Grandin --- desktop/qa/desktop_lib/test_desktop_lib.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'desktop') diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index 5d897c40f1da..181366e6a19e 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -3357,7 +3357,7 @@ void DesktopLOKTest::testRenderSearchResult_WriterNode() CPPUNIT_ASSERT_EQUAL(size_t(1440648), nByteSize); const sal_uInt8* pD = reinterpret_cast(pBuffer); - BitmapEx aBitmap = vcl::bitmap::CreateFromData(pD, nWidth, nHeight, nWidth * 4, vcl::PixelFormat::N32_BPP, true, true); + BitmapEx aBitmap = vcl::bitmap::CreateFromData(pD, nWidth, nHeight, nWidth * 4, /*nBitsPerPixel*/32, true, true); if (bDumpBitmap) { @@ -3402,7 +3402,7 @@ void DesktopLOKTest::testRenderSearchResult_CommonNode() CPPUNIT_ASSERT_EQUAL(size_t(73728), nByteSize); const sal_uInt8* pD = reinterpret_cast(pBuffer); - BitmapEx aBitmap = vcl::bitmap::CreateFromData(pD, nWidth, nHeight, nWidth * 4, vcl::PixelFormat::N32_BPP, true, true); + BitmapEx aBitmap = vcl::bitmap::CreateFromData(pD, nWidth, nHeight, nWidth * 4, /*nBitsPerPixel*/32, true, true); if (bDumpBitmap) { -- cgit