diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2021-08-09 12:44:40 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2021-09-08 10:31:03 +0200 |
commit | b9c2207e1b5247b4d3184b137be9a75a4b8c6c37 (patch) | |
tree | e1e16272c48b735d7e1ffa69a6b7f318ab2ca685 | |
parent | 89a282e874a706a6f7265218f476e3948dbaa10c (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/+/120201
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
-rw-r--r-- | sw/source/core/layout/layact.cxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index 8bc306ee8505..2b689f10b52e 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -2261,7 +2261,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 { |