vcl/skia/gdiimpl.cxx |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit 33863317e216b1ecd843f5eb584e99998a76305f
Author:     Patrick Luby <guibmac...@gmail.com>
AuthorDate: Wed Aug 28 18:50:57 2024 -0400
Commit:     Patrick Luby <guibomac...@gmail.com>
CommitDate: Thu Aug 29 02:12:57 2024 +0200

    tdf#162646 set extra drawing constraints when scaling
    
    Previously, setting stroke width and cap was only done when running
    unit tests. But the same drawing constraints are necessary when
    running with a Retina display on macOS and antialiasing is disabled.
    
    Change-Id: I816e8aed1ca62f01f2145af741ae5540379cd34a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172559
    Reviewed-by: Patrick Luby <guibomac...@gmail.com>
    Tested-by: Jenkins

diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index 2fdccc772253..267ea0f15f88 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -801,7 +801,15 @@ void SkiaSalGraphicsImpl::privateDrawAlphaRect(tools::Long 
nX, tools::Long nY, t
     {
         SkPaint paint = makeLinePaint(fTransparency);
         paint.setAntiAlias(!blockAA && mParent.getAntiAlias());
+#ifdef MACOSX
+        // tdf#162646 set extra drawing constraints when scaling
+        // Previously, setting stroke width and cap was only done when running
+        // unit tests. But the same drawing constraints are necessary when
+        // running with a Retina display on macOS and antialiasing is disabled.
+        if (mScaling != 1 && (isUnitTestRunning() || !paint.isAntiAlias()))
+#else
         if (mScaling != 1 && isUnitTestRunning())
+#endif
         {
             // On HiDPI displays, do not draw just a hairline but instead a 
full-width "pixel" when running unittests,
             // since tests often require precise pixel drawing.

Reply via email to