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

Luboš Luňák (via logerrit) logerrit at kemper.freedesktop.org
Thu Sep 16 22:52:54 UTC 2021


 vcl/source/window/paint.cxx |   12 ++++++++++++
 1 file changed, 12 insertions(+)

New commits:
commit a9cc066a86c6bd3423c5802c5a4eded55a50c754
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Thu Sep 16 12:23:59 2021 +0200
Commit:     Luboš Luňák <l.lunak at collabora.com>
CommitDate: Fri Sep 17 00:52:17 2021 +0200

    avoid more window invalidation in LOK mode
    
    This is an extension of 9b73d3e8926d5f9b10464d19b539eef3eb088f50.
    If we're not painting to windows in LOK mode, then it's a waste of CPU
    time to calculate invalidations for them when it'll be thrown away
    anyway.
    
    Change-Id: I20b1064cb9e41fd6d88b8dc2ee4edb80ae0e9104
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122194
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lunak at collabora.com>

diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index 5a01e4825e3a..0db0e6ccc400 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -758,6 +758,12 @@ void Window::ImplInvalidateFrameRegion( const vcl::Region* pRegion, InvalidateFl
 
 void Window::ImplInvalidateOverlapFrameRegion( const vcl::Region& rRegion )
 {
+    if (comphelper::LibreOfficeKit::isActive())
+    {
+        // Tiled rendering is used, so there's no need to invalidate for idle painting.
+        return;
+    }
+
     vcl::Region aRegion = rRegion;
 
     ImplClipBoundaries( aRegion, true, true );
@@ -788,6 +794,12 @@ void Window::ImplInvalidateParentFrameRegion( vcl::Region& rRegion )
 
 void Window::ImplInvalidate( const vcl::Region* pRegion, InvalidateFlags nFlags )
 {
+    if (comphelper::LibreOfficeKit::isActive())
+    {
+        // Tiled rendering is used, so there's no need to invalidate for idle painting.
+        return;
+    }
+
     // check what has to be redrawn
     bool bInvalidateAll = !pRegion;
 


More information about the Libreoffice-commits mailing list