diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2021-09-24 11:47:30 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2021-09-28 13:51:12 +0200 |
commit | 3604738373198feb4c1c7a9ef82b6ea1579265d8 (patch) | |
tree | b0ca92395b90de52900da14f85075c0d18993aa0 /vcl | |
parent | 2b32ab3a32ce9fff42818a6813a041b356d324b8 (diff) |
optimize out a bit of Invalidate() in LOK mode
Change-Id: I3c076e2506c9cade7e6bb874a2cddfa1ef0db6a7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122641
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/paint.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx index c7c3b7544937..8531ead70012 100644 --- a/vcl/source/window/paint.cxx +++ b/vcl/source/window/paint.cxx @@ -1202,8 +1202,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); } |