summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2021-08-09 12:44:40 +0200
committerLuboš Luňák <l.lunak@collabora.com>2021-09-08 10:32:03 +0200
commite2ef885007bcfe7a14c57865e4d3144028f59105 (patch)
tree4e14c9ced94122cf64ed71985c809dd779cf8e16 /sw/source
parenteeda6c57b14838e4a7381b5cd89505842acbf507 (diff)
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 <jenkinscollaboraoffice@gmail.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/layout/layact.cxx11
1 files changed, 10 insertions, 1 deletions
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
{