vcl/skia/gdiimpl.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) New commits: commit 588a4acb4526e33f69f07aacfe790c620c4a513c Author: Patrick Luby <guibmac...@gmail.com> AuthorDate: Wed Aug 28 18:50:57 2024 -0400 Commit: Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org> CommitDate: Thu Aug 29 14:02:22 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 (cherry picked from commit 33863317e216b1ecd843f5eb584e99998a76305f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172504 Tested-by: Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org> 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.