sw/source/core/view/viewsh.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
New commits: commit d0b5ff42431d8d18ab9b70fd54206f21bbe4316a Author: Miklos Vajna <[email protected]> AuthorDate: Wed Aug 4 13:44:24 2021 +0200 Commit: Mike Kaganski <[email protected]> CommitDate: Mon Aug 9 17:15:48 2021 +0200 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/+/120200 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Mike Kaganski <[email protected]> diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index bf160861ee3c..0a87c1672f97 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -418,7 +418,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); @@ -428,7 +431,10 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd ) pCurrentLayout->GetCurrShell()->InvalidateWindows(aRect.SVRect()); // #i75172# end DrawingLayer paint - DLPostPaint2(true); + if (!comphelper::LibreOfficeKit::isActive()) + { + DLPostPaint2(true); + } } }
