diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2023-03-24 17:42:40 +0000 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-05-17 00:37:45 +0200 |
commit | 765cc200fd7e809d4aeca9bc83fa125ee248fce9 (patch) | |
tree | d2c5a95e62538792783ef38484ee5ea71d27b480 /sw/source | |
parent | fdc0a082420d511fd0561ba087744518ccade665 (diff) |
lok: avoid painting writer windows to a giant virtual-device.
When layout changes, we don't want to immediately redraw lots of
windows; we should be able to wait for tiles to be rendered
instead. Certainly we don't want to allocate a giant virtual
device.
Unfortunately we also believe that full document invalidations
are cheap - so warn about that.
Change-Id: Ib56320d4860c4b6f4e100b30cc6d3e490a1c7a90
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149601
Tested-by: Jenkins
(cherry picked from commit 1ed50bb714b8ed657cd422df850a6852cd863f43)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149622
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/layout/layact.cxx | 1 | ||||
-rw-r--r-- | sw/source/core/view/viewsh.cxx | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index 583ca4a3b4db..be803a3b00c1 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -2352,6 +2352,7 @@ SwLayIdle::SwLayIdle( SwRootFrame *pRt, SwViewShellImp *pI ) : bool bUnlock = false; if ( pViewImp->HasPaintRegion() ) { + SAL_INFO("sw.idle", "Disappointing full document invalidation"); pViewImp->DeletePaintRegion(); // Cause a repaint with virtual device. diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 8a99aa5de310..53457942749f 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -475,7 +475,7 @@ void SwViewShell::ImplStartAction() void SwViewShell::ImplLockPaint() { - if ( GetWin() && GetWin()->IsVisible() ) + if ( GetWin() && GetWin()->IsVisible() && !comphelper::LibreOfficeKit::isActive()) GetWin()->EnablePaint( false ); //Also cut off the controls. Imp()->LockPaint(); } @@ -485,7 +485,7 @@ void SwViewShell::ImplUnlockPaint( bool bVirDev ) CurrShell aCurr( this ); if ( GetWin() && GetWin()->IsVisible() ) { - if ( (bInSizeNotify || bVirDev ) && VisArea().HasArea() ) + if ( (bInSizeNotify || bVirDev ) && VisArea().HasArea() && !comphelper::LibreOfficeKit::isActive()) { //Refresh with virtual device to avoid flickering. VclPtrInstance<VirtualDevice> pVout( *mpOut ); |