vcl/skia/gdiimpl.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) New commits: commit 16be4df75b23ec68c758e203a08af0f9486ebafb Author: Patrick Luby <guibmac...@gmail.com> AuthorDate: Mon Jun 24 15:34:47 2024 -0400 Commit: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> CommitDate: Thu Jun 27 16:50:09 2024 +0200
Related tdf#148569: do not apply macOS fix to non-macOS platforms Setting the stroke width and cap has a noticeable performance penalty when running on GTK3. Since tdf#148569 only appears to occur on macOS Retina displays, revert commit a4488013ee6c87a97501b620dbbf56622fb70246 for non-macOS platforms. Change-Id: I2435434c6f66b84483046ea558bac3d47b8803ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169493 Reviewed-by: Patrick Luby <guibomac...@gmail.com> Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx index b5720026ee29..8adaf1a6b191 100644 --- a/vcl/skia/gdiimpl.cxx +++ b/vcl/skia/gdiimpl.cxx @@ -730,11 +730,20 @@ void SkiaSalGraphicsImpl::drawPixel(tools::Long nX, tools::Long nY, Color nColor // Apparently drawPixel() is actually expected to set the pixel and not draw it. paint.setBlendMode(SkBlendMode::kSrc); // set as is, including alpha +#ifdef MACOSX // 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) +#else + // Related tdf#148569: do not apply macOS fix to non-macOS platforms + // Setting the stroke width and cap has a noticeable performance penalty + // when running on GTK3. Since tdf#148569 only appears to occur on macOS + // Retina displays, revert commit a4488013ee6c87a97501b620dbbf56622fb70246 + // for non-macOS platforms. + if (mScaling != 1 && isUnitTestRunning()) +#endif { // On HiDPI displays, draw a square on the entire non-hidpi "pixel" when running unittests, // since tests often require precise pixel drawing.