sd/qa/unit/PNGExportTests.cxx |   12 ++++++++++++
 1 file changed, 12 insertions(+)

New commits:
commit 976cd8c1c146d6a733a53ac6a55aad84b9bbd406
Author:     Patrick Luby <plub...@neooffice.org>
AuthorDate: Fri May 12 09:11:13 2023 -0400
Commit:     Patrick Luby <plub...@neooffice.org>
CommitDate: Fri May 12 19:28:11 2023 +0200

    Disable test that always fails with Apple Retina displays
    
    With a HiDPI display on macOS, each logical pixel is backed
    by 4 physical pixels. Turning off antialiasing and drawing a
    diagonal line causes many logical pixels on the edge of the
    diagonal line to have a mixture of white and blue physical
    pixels. Then, when such logical pixels are fetched via
    BitmapEx::GetPixelColor(), their underlying 4 white and blue
    physical pixels are combined into blended shades of white
    and blue.
    
    Change-Id: I1aca121f294ce2f4cb7b17a93b904425c8049f80
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151705
    Tested-by: Jenkins
    Reviewed-by: Patrick Luby <plub...@neooffice.org>

diff --git a/sd/qa/unit/PNGExportTests.cxx b/sd/qa/unit/PNGExportTests.cxx
index b3863c8b9622..5ca65f545dc2 100644
--- a/sd/qa/unit/PNGExportTests.cxx
+++ b/sd/qa/unit/PNGExportTests.cxx
@@ -474,6 +474,17 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf155048)
 
     // 1. AA disabled
     {
+#ifdef MACOSX
+    // Disable test that always fails with Apple Retina displays
+    // With a HiDPI display on macOS, each logical pixel is backed
+    // by 4 physical pixels. Turning off antialiasing and drawing a
+    // diagonal line causes many logical pixels on the edge of the
+    // diagonal line to have a mixture of white and blue physical
+    // pixels. Then, when such logical pixels are fetched via
+    // BitmapEx::GetPixelColor(), their underlying 4 white and blue
+    // physical pixels are combined into blended shades of white
+    // and blue.
+#else
         css::uno::Sequence<css::beans::PropertyValue> aFilterData{
             comphelper::makePropertyValue("PixelWidth", sal_Int32(200)),
             comphelper::makePropertyValue("PixelHeight", sal_Int32(200)),
@@ -497,6 +508,7 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf155048)
         // There must be only two colors (white and blue) in the bitmap 
generated without AA
         CPPUNIT_ASSERT_EQUAL(size_t(2), foundColors.size());
         maTempFile.CloseStream();
+#endif
     }
 
     // 2. AA enabled

Reply via email to