[Libreoffice-commits] core.git: Branch 'feature/tiled-editing' - sw/source

Miklos Vajna vmiklos at collabora.co.uk
Wed Apr 8 01:27:11 PDT 2015


 sw/source/core/view/viewsh.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 880228e7a99b95879a1e0d5315e6bd1401dffc20
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed Apr 8 10:05:18 2015 +0200

    SwViewShell::PaintTile: avoid incomplete tiles when layout is not ready
    
    The problem was that in SwViewShell::Paint(), in case
    CheckInvalidForPaint() returns true, we don't paint anything, but rely
    on invalidations to call Paint() again and hand out an incomplete tile.
    
    For tiled rendering, we want to hand out complete tiles all the time, so
    call CheckInvalidForPaint() early in SwViewShell::PaintTile() that will
    ensure that by the time SwViewShell::Paint() is called, the layout is
    ready for that tile.
    
    Without this, when opening any larger document with the Android viewer,
    about at least once out of 5 times an incomplete tile (e.g. almost
    totally white) was shown for the first page, and the user had to work
    around this by zooming out + in again to force a re-draw with valid
    layout.
    
    Change-Id: Ic7d3a6ddbf9f04beae9ecaa9563d3f5b4d22cc5c

diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 4fdf00b..14dfb43 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1816,6 +1816,9 @@ void SwViewShell::PaintTile(VirtualDevice &rDevice, int contextWidth, int contex
     // tiled rendering?
     VisPortChgd(SwRect(aOutRect));
 
+    // Invoke SwLayAction if layout is not yet ready.
+    CheckInvalidForPaint(aOutRect);
+
     // draw - works in logic coordinates
     Paint(aOutRect);
 


More information about the Libreoffice-commits mailing list