summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2021-09-24 11:47:30 +0200
committerLuboš Luňák <l.lunak@collabora.com>2021-09-28 13:47:54 +0200
commitfbaa1c3377f445180db2f7811b9516895b357aa8 (patch)
treeaa3209abde60c093f88651923e6d28f668ee6145
parent6eac17ddcb25765f395493526e75c979049c73e2 (diff)
optimize out a bit of Invalidate() in LOK mode
Change-Id: I3c076e2506c9cade7e6bb874a2cddfa1ef0db6a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122674 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
-rw-r--r--vcl/source/window/paint.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index 65451c0c4d59..302faae5df06 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -1179,8 +1179,11 @@ void Window::Invalidate( const tools::Rectangle& rRect, InvalidateFlags nFlags )
tools::Rectangle aRect = pOutDev->ImplLogicToDevicePixel( rRect );
if ( !aRect.IsEmpty() )
{
- vcl::Region aRegion( aRect );
- ImplInvalidate( &aRegion, nFlags );
+ if (!comphelper::LibreOfficeKit::isActive())
+ { // ImplInvalidate() immediatelly returns in LOK mode, skip useless Region construction
+ vcl::Region aRegion( aRect );
+ ImplInvalidate( &aRegion, nFlags );
+ }
tools::Rectangle aLogicRectangle(rRect);
LogicInvalidate(&aLogicRectangle);
}