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>
This commit is contained in:
Patrick Luby
2023-12-15 07:23:18 +01:00
committed by Noel Grandin
parent fdc87dd565
commit 2502131667
+4 -1
View File
@@ -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"))
{