diff options
author | Pranav Kant <pranavk@collabora.co.uk> | 2018-07-17 19:10:48 +0530 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2018-08-17 15:21:04 +0200 |
commit | a861adc9b0f4a527d1fe8c415dab33ce9d396de0 (patch) | |
tree | 7051d6f1f74f633279b2c2258b6ad8b219c25db2 | |
parent | 700a6a6939605eb9d0bf5f762bf8c4420e8d85bb (diff) |
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: pranavk <pranavk@collabora.co.uk>
(cherry picked from commit 8de98e61fbc96bf523b3dec7e1e52eb7e2d7693e)
Reviewed-on: https://gerrit.libreoffice.org/57562
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
-rw-r--r-- | sd/source/ui/view/sdwindow.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/window2.cxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx index 59fe3c2b85a2..df031620d39e 100644 --- a/sd/source/ui/view/sdwindow.cxx +++ b/sd/source/ui/view/sdwindow.cxx @@ -1013,7 +1013,7 @@ Selection Window::GetSurroundingTextSelection() const void Window::LogicInvalidate(const Rectangle* pRectangle) { DrawViewShell* pDrawViewShell = dynamic_cast<DrawViewShell*>(mpViewShell); - if (pDrawViewShell && pDrawViewShell->IsInSwitchPage()) + if (!pDrawViewShell || pDrawViewShell->IsInSwitchPage()) return; OString sRectangle; @@ -1026,7 +1026,7 @@ void Window::LogicInvalidate(const Rectangle* pRectangle) aRectangle = OutputDevice::LogicToLogic(aRectangle, MapUnit::Map100thMM, MapUnit::MapTwip); sRectangle = aRectangle.toString(); } - SfxViewShell& rSfxViewShell = mpViewShell->GetViewShellBase(); + SfxViewShell& rSfxViewShell = pDrawViewShell->GetViewShellBase(); SfxLokHelper::notifyInvalidation(&rSfxViewShell, sRectangle); } diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index e45fee287fd0..7617937925dc 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -1399,7 +1399,7 @@ void Window::queue_resize(StateChangedType eReason) if (VclPtr<vcl::Window> pParent = GetParentWithLOKNotifier()) { - if (GetParentDialog()) + if (!pParent->IsInInitShow()) LogicInvalidate(nullptr); } } |