summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2021-08-04 13:44:24 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2021-08-04 18:33:17 +0200
commitd105babfb52e9ebfb0838e2846a48fd015ea92bf (patch)
tree89af1189a7a299754bc356d65cfb5f779566c1fb /sw
parent675066678532110e8a1d3031407e0d14a561b254 (diff)
sw lok: avoid expensive DLPre/PostPaint2() around InvalidateWindows()
This shows up on profiles and it's not needed. It was only there, because Online always needs an invalidation to have updated tiles, so there the paint was replaced with an invalidate. And then the drawinglayer setup/teardown was not made conditional by accident. The PaintTile() case goes via Paint() -> PaintSwFrame(), which still calls these functions; this commit only speeds up SwViewShell::ImplEndAction(), which is called synchronously e.g. on every keypress. (cherry picked from commit aff28c59816d046d9b74460c1b17101b99b9514e) Change-Id: I6c362f148bc2837bd842602754770c5267e16afd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120002 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/view/viewsh.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index ef34c351b6c0..4276b4161482 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -409,7 +409,10 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd )
// seems to work (and does technically) but fails with transparent objects. Since the
// region given to BeginDarwLayers() defines the clip region for DrawingLayer paint,
// transparent objects in the single rectangles will indeed be painted multiple times.
- DLPrePaint2(vcl::Region(aRect.SVRect()));
+ if (!comphelper::LibreOfficeKit::isActive())
+ {
+ DLPrePaint2(vcl::Region(aRect.SVRect()));
+ }
if ( bPaintsFromSystem )
PaintDesktop(*GetOut(), aRect);
@@ -419,7 +422,10 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd )
pCurrentLayout->GetCurrShell()->InvalidateWindows(aRect.SVRect());
// #i75172# end DrawingLayer paint
- DLPostPaint2(true);
+ if (!comphelper::LibreOfficeKit::isActive())
+ {
+ DLPostPaint2(true);
+ }
}
}