Kaydet (Commit) 8de98e61 authored tarafından Pranav Kant's avatar Pranav Kant Kaydeden (comit) pranavk

lokdialog: no invalidation when in init show

This improves LOK dialog opening time considerably.

libreofficekit/tilebench results:

Before:
profile run:
  initialization - 346.5185(ms)
  load document - 2162.5881(ms)
  open dialog - 7077.8980(ms)
  wait for dialog - 52.7742(ms)
  render dialog - 256.9597(ms)
  post close dialog - 523.7811(ms)
  destroy document - 58.3723(ms)
Total: 10.4789(s)

After:
profile run:
  initialization - 336.5867(ms)
  load document - 2155.5481(ms)
  open dialog - 1151.4130(ms)
  wait for dialog - 51.5332(ms)
  render dialog - 260.3197(ms)
  post close dialog - 519.8729(ms)
  destroy document - 56.7322(ms)
Total: 4.5320(s)

Change-Id: I6345aca33c5881aba33c8a5f74765b99fe098711
Reviewed-on: https://gerrit.libreoffice.org/57561
Tested-by: Jenkins
Reviewed-by: 's avatarpranavk <pranavk@collabora.co.uk>
üst 53352706
......@@ -1012,7 +1012,7 @@ Selection Window::GetSurroundingTextSelection() const
void Window::LogicInvalidate(const ::tools::Rectangle* pRectangle)
{
DrawViewShell* pDrawViewShell = dynamic_cast<DrawViewShell*>(mpViewShell);
if (pDrawViewShell && pDrawViewShell->IsInSwitchPage())
if (!pDrawViewShell || pDrawViewShell->IsInSwitchPage())
return;
OString sRectangle;
......@@ -1025,7 +1025,7 @@ void Window::LogicInvalidate(const ::tools::Rectangle* pRectangle)
aRectangle = OutputDevice::LogicToLogic(aRectangle, MapMode(MapUnit::Map100thMM), MapMode(MapUnit::MapTwip));
sRectangle = aRectangle.toString();
}
SfxViewShell& rSfxViewShell = mpViewShell->GetViewShellBase();
SfxViewShell& rSfxViewShell = pDrawViewShell->GetViewShellBase();
SfxLokHelper::notifyInvalidation(&rSfxViewShell, sRectangle);
}
......
......@@ -1375,7 +1375,7 @@ void Window::queue_resize(StateChangedType eReason)
if (VclPtr<vcl::Window> pParent = GetParentWithLOKNotifier())
{
if (GetParentDialog())
if (!pParent->IsInInitShow())
LogicInvalidate(nullptr);
}
}
......
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