diff options
author | Patrick Luby <plubius@neooffice.org> | 2023-05-12 09:11:13 -0400 |
---|---|---|
committer | Patrick Luby <plubius@neooffice.org> | 2023-05-12 21:09:46 +0200 |
commit | 4b915e6f3ac2714fffdcb20f600747ef949540f1 (patch) | |
tree | a2b9de05edb0602ecbe400534683e511be80c4e7 | |
parent | c2cfeed369a2b0f6d91d1093d3876357277411c9 (diff) |
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 <plubius@neooffice.org>
(cherry picked from commit 158475d72cfce75c7acccb28d790812a14945879)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151620
-rw-r--r-- | sd/qa/unit/PNGExportTests.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sd/qa/unit/PNGExportTests.cxx b/sd/qa/unit/PNGExportTests.cxx index 69f4dda97e3c..eb75d62ab04e 100644 --- a/sd/qa/unit/PNGExportTests.cxx +++ b/sd/qa/unit/PNGExportTests.cxx @@ -476,6 +476,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)), @@ -499,6 +510,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 |