vcl/skia/gdiimpl.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 250213166762bceedc052d80cf6ed5d64e286000
Author:     Patrick Luby <plub...@libreoffice.org>
AuthorDate: Thu Dec 14 18:53:11 2023 -0500
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri Dec 15 07:23:18 2023 +0100

    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.gran...@collabora.co.uk>

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"))
             {

Reply via email to