vcl/skia/gdiimpl.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
New commits: commit a4488013ee6c87a97501b620dbbf56622fb70246 Author: Patrick Luby <guibmac...@gmail.com> AuthorDate: Sun Jun 16 20:35:33 2024 -0400 Commit: Patrick Luby <guibomac...@gmail.com> CommitDate: Mon Jun 17 14:51:45 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 <noel.gran...@collabora.co.uk> Reviewed-by: Patrick Luby <guibomac...@gmail.com> diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx index 4c34d9ab2870..b5720026ee29 100644 --- a/vcl/skia/gdiimpl.cxx +++ b/vcl/skia/gdiimpl.cxx @@ -729,7 +729,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.