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

New commits:
commit f6e4fa4dab3d31ac355aa796f0325f94e7069f40
Author:     Patrick Luby <[email protected]>
AuthorDate: Sun Jun 16 20:35:33 2024 -0400
Commit:     Noel Grandin <[email protected]>
CommitDate: Tue Jun 18 10:22:27 2024 +0200

    tdf#148569 set extra drawing constraints when scaling
    
    Previously, setting stroke width and cap was only done when running
    unit tests. But the same drawing contraints are necessary when running
    with a Retina display on macOS.
    
    Change-Id: I74f7347d30a410f7d3485388ffec61b32730b948
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168973
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>
    Reviewed-by: Patrick Luby <[email protected]>
    (cherry picked from commit a4488013ee6c87a97501b620dbbf56622fb70246)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168948

diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index 5a04a08b6438..e1e6333761b8 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -720,7 +720,12 @@ void SkiaSalGraphicsImpl::drawPixel(tools::Long nX, 
tools::Long nY, Color nColor
     SkPaint paint = makePixelPaint(nColor);
     // Apparently drawPixel() is actually expected to set the pixel and not 
draw it.
     paint.setBlendMode(SkBlendMode::kSrc); // set as is, including alpha
-    if (mScaling != 1 && isUnitTestRunning())
+
+    // tdf#148569 set extra drawing constraints when scaling
+    // Previously, setting stroke width and cap was only done when running
+    // unit tests. But the same drawing contraints are necessary when running
+    // with a Retina display on macOS.
+    if (mScaling != 1)
     {
         // On HiDPI displays, draw a square on the entire non-hidpi "pixel" 
when running unittests,
         // since tests often require precise pixel drawing.

Reply via email to