summaryrefslogtreecommitdiff
path: root/sd/qa/unit/PNGExportTests.cxx
diff options
context:
space:
mode:
authorPatrick Luby <guibmacdev@gmail.com>2024-05-12 14:04:30 -0400
committerPatrick Luby <guibomacdev@gmail.com>2024-05-15 18:04:35 +0200
commit2a9eb581f0edfae8123018006df5cc9de1e1fd45 (patch)
tree26214b1453b9a03664c4d93eeb3d747850f17c33 /sd/qa/unit/PNGExportTests.cxx
parenteee70d4e776a970a700db5379355292c480f8a02 (diff)
tdf#160690 set an opaque alpha mask for non-transparent frames
Due to the switch from transparency to alpha in commit 81994cb2b8b32453a92bcb011830fcb884f22ff3, an empty alpha mask is treated as a completely transparent bitmap. So revert all of the previous commits for tdf#157576, tdf#157635, and tdf#157793 and create a completely opaque bitmap instead. Note: this fix also fixes tdf#157576, tdf#157635, and tdf#157793. Change-Id: Ic2ccad6ab94e4d43b1b66013f85955d474dc0151 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167563 Reviewed-by: Patrick Luby <guibomacdev@gmail.com> Tested-by: Jenkins
Diffstat (limited to 'sd/qa/unit/PNGExportTests.cxx')
-rw-r--r--sd/qa/unit/PNGExportTests.cxx12
1 files changed, 4 insertions, 8 deletions
diff --git a/sd/qa/unit/PNGExportTests.cxx b/sd/qa/unit/PNGExportTests.cxx
index 8c28a1951f7c..d99955a923ae 100644
--- a/sd/qa/unit/PNGExportTests.cxx
+++ b/sd/qa/unit/PNGExportTests.cxx
@@ -536,25 +536,21 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf157793)
CPPUNIT_ASSERT_EQUAL(Size(100, 100), aSize);
Bitmap aBMP = aBMPEx.GetBitmap();
BitmapScopedReadAccess pReadAccess(aBMP);
- int nLightGrayCount = 0;
+ int nWhiteCount = 0;
for (tools::Long nX = 1; nX < aSize.Width() - 1; ++nX)
{
for (tools::Long nY = 1; nY < aSize.Height() - 1; ++nY)
{
const Color aColor = pReadAccess->GetColor(nY, nX);
- if (aColor == 0xfefefe)
- ++nLightGrayCount;
+ if (aColor == 0xffffff)
+ ++nWhiteCount;
}
}
- // FIXME this still has some issues with skia
- if (SkiaHelper::isVCLSkiaEnabled())
- return;
-
// Without the fix in place, this test would have failed with
// - Expected greater than: 7800
// - Actual : 0
- CPPUNIT_ASSERT_GREATER(7800, nLightGrayCount);
+ CPPUNIT_ASSERT_GREATER(7800, nWhiteCount);
}
CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf157635)