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
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user