diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-04-08 10:05:18 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-04-08 10:48:19 +0200 |
commit | d4e4c5e23e31ddeee1fa994ce4000c0251b13d59 (patch) | |
tree | 870f359527c5d16df9330be8b888e4f836bf1ddd /sw | |
parent | 216fdcbdb4c17f349ffd68abd1f372bea3287fad (diff) |
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
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/view/viewsh.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
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); |