From d4e4c5e23e31ddeee1fa994ce4000c0251b13d59 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Wed, 8 Apr 2015 10:05:18 +0200 Subject: 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 --- sw/source/core/view/viewsh.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sw') diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 4fdf00b7d796..14dfb4354174 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); -- cgit