summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2021-09-16 12:23:59 +0200
committerLuboš Luňák <l.lunak@collabora.com>2021-09-17 00:52:17 +0200
commita9cc066a86c6bd3423c5802c5a4eded55a50c754 (patch)
tree7be2927d4aa082d00bb45717831d75d769148327
parentd09770aab5b77c8f19da855855558154151ab45b (diff)
avoid more window invalidation in LOK mode
This is an extension of 9b73d3e8926d5f9b10464d19b539eef3eb088f50. If we're not painting to windows in LOK mode, then it's a waste of CPU time to calculate invalidations for them when it'll be thrown away anyway. Change-Id: I20b1064cb9e41fd6d88b8dc2ee4edb80ae0e9104 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122194 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
-rw-r--r--vcl/source/window/paint.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index 5a01e4825e3a..0db0e6ccc400 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -758,6 +758,12 @@ void Window::ImplInvalidateFrameRegion( const vcl::Region* pRegion, InvalidateFl
void Window::ImplInvalidateOverlapFrameRegion( const vcl::Region& rRegion )
{
+ if (comphelper::LibreOfficeKit::isActive())
+ {
+ // Tiled rendering is used, so there's no need to invalidate for idle painting.
+ return;
+ }
+
vcl::Region aRegion = rRegion;
ImplClipBoundaries( aRegion, true, true );
@@ -788,6 +794,12 @@ void Window::ImplInvalidateParentFrameRegion( vcl::Region& rRegion )
void Window::ImplInvalidate( const vcl::Region* pRegion, InvalidateFlags nFlags )
{
+ if (comphelper::LibreOfficeKit::isActive())
+ {
+ // Tiled rendering is used, so there's no need to invalidate for idle painting.
+ return;
+ }
+
// check what has to be redrawn
bool bInvalidateAll = !pRegion;