summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Luby <guibmacdev@gmail.com>2024-06-16 20:35:33 -0400
committerAndras Timar <andras.timar@collabora.com>2024-06-24 16:42:20 +0200
commit469deb7f8c0bdc338eecf6852947a90dc7ada569 (patch)
treec383e899b34eaa4caef8df17014694cea551ce83
parent86742dfbc232a1cd39f8035ddbc5b58d059780b2 (diff)
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 <noel.grandin@collabora.co.uk> Reviewed-by: Patrick Luby <guibomacdev@gmail.com> (cherry picked from commit a4488013ee6c87a97501b620dbbf56622fb70246) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168948
-rw-r--r--vcl/skia/gdiimpl.cxx7
1 files changed, 6 insertions, 1 deletions
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.