summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Luby <plubius@libreoffice.org>2023-12-14 18:53:11 -0500
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-12-15 07:23:18 +0100
commit250213166762bceedc052d80cf6ed5d64e286000 (patch)
tree90e1ccd9635178074a3c2b89425a1944f494d156
parentfdc87dd56548622e13353b4cf9864232ee0110fb (diff)
Fix Skia unit test failures when using a Retina display
When running on macOS with a Retina display, several BackendTest unit tests also need a lower quality scaling level. Change-Id: Ied7141af886357a846f5c4633703114c18dfabf9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160811 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--vcl/skia/gdiimpl.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index f8f885b94fc9..ffdeb81b2ad2 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -1405,7 +1405,10 @@ std::shared_ptr<SalBitmap> SkiaSalGraphicsImpl::getBitmap(tools::Long nX, tools:
{
// Some tests require exact pixel values and would be confused by smooth-scaling.
// And some draw something smooth and not smooth-scaling there would break the checks.
- if (isUnitTestRunning("BackendTest__testDrawHaflEllipseAAWithPolyLineB2D_")
+ // When running on macOS with a Retina display, several BackendTest unit tests
+ // also need a lower quality scaling level.
+ if (getWindowScaling() != 1
+ || isUnitTestRunning("BackendTest__testDrawHaflEllipseAAWithPolyLineB2D_")
|| isUnitTestRunning("BackendTest__testDrawRectAAWithLine_")
|| isUnitTestRunning("GraphicsRenderTest__testDrawRectAAWithLine"))
{