vcl/skia/gdiimpl.cxx | 9 +++++++++
1 file changed, 9 insertions(+)
New commits:
commit 4982d78f887440cbb12aec512a757dd7d3a75f43
Author: Patrick Luby <[email protected]>
AuthorDate: Mon Jun 24 15:34:47 2024 -0400
Commit: Christian Lohmaier <[email protected]>
CommitDate: Thu Jun 27 16:49:52 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/+/169494
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <[email protected]>
Reviewed-by: Patrick Luby <[email protected]>
diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index e1e6333761b8..4e5d65c1de3c 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -721,11 +721,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.