vcl/skia/gdiimpl.cxx | 8 ++++++++
1 file changed, 8 insertions(+)
New commits:
commit 6ce68d330c2c88a72a0af7190e89ded93d4a6e27
Author: Patrick Luby <[email protected]>
AuthorDate: Wed Aug 28 18:50:57 2024 -0400
Commit: Michael Stahl <[email protected]>
CommitDate: Fri Aug 30 11:33:14 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 <[email protected]>
Tested-by: Jenkins
(cherry picked from commit 33863317e216b1ecd843f5eb584e99998a76305f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172504
Tested-by: Ilmari Lauhakangas <[email protected]>
Reviewed-by: Ilmari Lauhakangas <[email protected]>
(cherry picked from commit 588a4acb4526e33f69f07aacfe790c620c4a513c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172579
Reviewed-by: Xisco Fauli <[email protected]>
Tested-by: Michael Stahl <[email protected]>
Reviewed-by: Michael Stahl <[email protected]>
diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index 8adaf1a6b191..f9d591dba4df 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.