sw/source/core/layout/layact.cxx |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit e2ef885007bcfe7a14c57865e4d3144028f59105
Author:     Luboš Luňák <l.lu...@collabora.com>
AuthorDate: Mon Aug 9 12:44:40 2021 +0200
Commit:     Luboš Luňák <l.lu...@collabora.com>
CommitDate: Wed Sep 8 10:32:03 2021 +0200

    avoid repeated writer layout calls with tiled rendering
    
    My next commit will disable idle paints for tile rendering, as they
    do nothing in that case (or at least that should be the case).
    But this code causes an infinite loop with idle layout timer,
    because painting resets the SwViewShellImp paint region, which is
    not performed if painting is done only later by idle rendering.
    
    Change-Id: Ic401f16254aade02ddb3e4faffd99f0ce29d4df4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120240
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Luboš Luňák <l.lu...@collabora.com>

diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index 87b76cc6b4ca..c8924882b5fd 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -2230,7 +2230,16 @@ SwLayIdle::SwLayIdle( SwRootFrame *pRt, SwViewShellImp 
*pI ) :
         {
             --rSh.mnStartAction;
 
-            if ( rSh.Imp()->GetRegion() )
+            // When using tiled rendering, idle painting is disabled and 
paints are done
+            // only later by tiled rendering. But paints call 
SwViewShellImp::DelRegion()
+            // to reset this GetRegion(), and if it's done too late,
+            // SwTiledRenderingTest::testTablePaintInvalidate() will end up in 
an infinite
+            // loop, because the idle layout will call this code repeatedly, 
because there
+            // will be no idle paints to reset GetRegion().
+            // This code dates back to the initial commit, and I find its 
purpose unclear,
+            // so I'm still leaving it here in case it turns out it serves a 
purpose.
+            static const bool blockOnRepaints = true;
+            if (!blockOnRepaints && rSh.Imp()->GetRegion())
                 bActions = true;
             else
             {

Reply via email to