diff options
author | Patrick Luby <plubius@neooffice.org> | 2023-05-12 09:11:13 -0400 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2023-05-13 20:05:34 +0200 |
commit | 5942f2eaa6411d52411dab69a0f037234c3e0a85 (patch) | |
tree | 8c70f56bd802ad92defacb6162330435f20eb244 /sd | |
parent | 758b763d6b0367454029fc257978e5125a966f18 (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
Diffstat (limited to 'sd')
-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 |