Blame SOURCES/0115-tdf-94237-tiled-rendering-Use-the-entire-document-as.patch

f325b2
From 70b567511fb61ff12e9b2b68913a81a4a25ebd59 Mon Sep 17 00:00:00 2001
f325b2
From: Jan Holesovsky <kendy@collabora.com>
f325b2
Date: Tue, 15 Sep 2015 20:22:08 +0200
f325b2
Subject: [PATCH 115/398] tdf#94237 tiled rendering: Use the entire document as
f325b2
 the visual area.
f325b2
f325b2
Many places were already adapted for the tiled rendering, and the conditions
f325b2
checking for the VisArea() were changed so that the checks are ignored when
f325b2
tiled rendering is active.
f325b2
f325b2
Unfortunately there are still some places left, and they are causing that
f325b2
various areas are invalidated only partially.  Let's sort it out for good, and
f325b2
report the entire document as the VisArea() when the tiled rendering is
f325b2
active, and if there are performance problems, let's profile that & act
f325b2
accordingly.
f325b2
f325b2
Change-Id: I53f18915ed0aec898704dd1350a9534cfc3f001b
f325b2
(cherry picked from commit 12e3b51abe883202af09769873f87b27d7de118b)
f325b2
---
f325b2
 sw/inc/viewsh.hxx              | 3 ++-
f325b2
 sw/source/core/view/viewsh.cxx | 7 +++++++
f325b2
 2 files changed, 9 insertions(+), 1 deletion(-)
f325b2
f325b2
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
f325b2
index 763af506b210..1ba064f0c16c 100644
f325b2
--- a/sw/inc/viewsh.hxx
f325b2
+++ b/sw/inc/viewsh.hxx
f325b2
@@ -31,6 +31,7 @@
f325b2
 #include <vcl/mapmod.hxx>
f325b2
 #include <vcl/print.hxx>
f325b2
 #include <vcl/vclptr.hxx>
f325b2
+
f325b2
 #define LOK_USE_UNSTABLE_API
f325b2
 #include <LibreOfficeKit/LibreOfficeKitTypes.h>
f325b2
 
f325b2
@@ -269,7 +270,7 @@ public:
f325b2
     bool SmoothScroll( long lXDiff, long lYDiff, const Rectangle* );//Browser
f325b2
     void EnableSmooth( bool b ) { mbEnableSmooth = b; }
f325b2
 
f325b2
-    const SwRect& VisArea() const { return maVisArea; }
f325b2
+    const SwRect& VisArea() const;
f325b2
 
f325b2
     // If necessary scroll until passed Rect is situated in visible sector.
f325b2
     void MakeVisible( const SwRect & );
f325b2
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
f325b2
index 3d565aea254c..92480b242089 100644
f325b2
--- a/sw/source/core/view/viewsh.cxx
f325b2
+++ b/sw/source/core/view/viewsh.cxx
f325b2
@@ -569,6 +569,13 @@ void SwViewShell::InvalidateWindows( const SwRect &rRect )
f325b2
     }
f325b2
 }
f325b2
 
f325b2
+const SwRect& SwViewShell::VisArea() const
f325b2
+{
f325b2
+    // when using the tiled rendering, consider the entire document as our
f325b2
+    // visible area
f325b2
+    return isTiledRendering()? GetLayout()->Frm(): maVisArea;
f325b2
+}
f325b2
+
f325b2
 void SwViewShell::MakeVisible( const SwRect &rRect )
f325b2
 {
f325b2
     if ( !VisArea().IsInside( rRect ) || IsScrollMDI( this, rRect ) || GetCareWin(*this) )
f325b2
-- 
f325b2
2.12.0
f325b2