Kaydet (Commit) a876de01 authored tarafından Michael Meeks's avatar Michael Meeks

lok: disable VCL painting and whole window invalidation.

The reasoning is somewhat complex:

void Window::ImplInvalidateFrameRegion( const vcl::Region* pRegion, InvalidateFlags nFlags )

sets the mnPaintFlags on the mpWindowImpl - and then queues an idle
paint. This paint in LOK mode does ~nothing - since all rendering is
tiled, although amazingly it does emit eg. selection callbacks.

However the paint flag - changes the behavior of Window::Update() to
force a complete window invalidate. This happens, but only rarely -
when a key-event manages to get into the mainloop before the idle
paint handler arrives and does nothing (except clear the paint flags).

So - don't do these big invalidations we don't need to in lok mode,
unless it is for dialogs - which presumably Pranav wanted fixed by
625087b5.

Change-Id: I88dda34b8d8bba9c89296d883ad9169fe49a7c5e
Reviewed-on: https://gerrit.libreoffice.org/71395
Tested-by: Jenkins
Reviewed-by: 's avatarMichael Meeks <michael.meeks@collabora.com>
üst b596210c
......@@ -33,6 +33,7 @@
#include <salframe.hxx>
#include <svdata.hxx>
#include <comphelper/lok.hxx>
#include <comphelper/profilezone.hxx>
#if HAVE_FEATURE_OPENGL
#include <vcl/opengl/OpenGLHelper.hxx>
#endif
......@@ -631,6 +632,8 @@ void Window::ImplCallOverlapPaint()
IMPL_LINK_NOARG(Window, ImplHandlePaintHdl, Timer *, void)
{
comphelper::ProfileZone aZone("VCL idle re-paint");
// save paint events until layout is done
if (IsSystemWindow() && static_cast<const SystemWindow*>(this)->hasPendingLayout())
{
......@@ -652,6 +655,8 @@ IMPL_LINK_NOARG(Window, ImplHandlePaintHdl, Timer *, void)
IMPL_LINK_NOARG(Window, ImplHandleResizeTimerHdl, Timer *, void)
{
comphelper::ProfileZone aZone("VCL idle resize");
if( mpWindowImpl->mbReallyVisible )
{
ImplCallResize();
......@@ -719,6 +724,7 @@ void Window::ImplInvalidateFrameRegion( const vcl::Region* pRegion, InvalidateFl
pParent->ImplInvalidateFrameRegion( pChildRegion, nFlags );
}
}
if ( !mpWindowImpl->mpFrameData->maPaintIdle.IsActive() )
mpWindowImpl->mpFrameData->maPaintIdle.Start();
}
......@@ -1321,10 +1327,13 @@ void Window::Update()
}
pUpdateWindow->ImplCallPaint(nullptr, pUpdateWindow->mpWindowImpl->mnPaintFlags);
pUpdateWindow->LogicInvalidate(nullptr);
if (comphelper::LibreOfficeKit::isActive() && pUpdateWindow->GetParentDialog())
pUpdateWindow->LogicInvalidate(nullptr);
if (xWindow->IsDisposed())
return;
bFlush = true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment