[Libreoffice-commits] core.git: sw/source

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Wed Aug 4 12:40:49 UTC 2021


 sw/source/core/view/viewsh.cxx |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

New commits:
commit aff28c59816d046d9b74460c1b17101b99b9514e
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Wed Aug 4 13:44:24 2021 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Wed Aug 4 14:40:12 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.
    
    Change-Id: I6c362f148bc2837bd842602754770c5267e16afd
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119997
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
    Tested-by: Jenkins

diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index b8b292032db5..45621dc62d74 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -411,7 +411,10 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd )
                             // seems to work (and does technically) but fails with transparent objects. Since the
                             // region given to BeginDrawLayers() 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);
@@ -421,7 +424,10 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd )
                                 pCurrentLayout->GetCurrShell()->InvalidateWindows(aRect);
 
                             // #i75172# end DrawingLayer paint
-                            DLPostPaint2(true);
+                            if (!comphelper::LibreOfficeKit::isActive())
+                            {
+                                DLPostPaint2(true);
+                            }
                         }
                     }
 


More information about the Libreoffice-commits mailing list