summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrzej Hunt <andrzej.hunt@collabora.com>2014-07-24 21:15:49 +0200
committerAndrzej Hunt <andrzej.hunt@collabora.com>2014-07-26 15:42:03 +0200
commit94c720830c0f95bd9776ea3f21623bb949b9bbfe (patch)
treebeda8b8d5c278581684b988711c0d05ef5d83acf
parent7bf98caddda048db0f39048af178621294aa0665 (diff)
Tiled Rendering: ensure rendered area is visible correctly.
Using SetVisArea can cause problems due to various internal state getting confused, however this gives correct output without viewport assertion problems or missing content. Change-Id: I8d206ab201167ea96a0ac853187861e8c3d541e5
-rw-r--r--sw/source/core/view/viewsh.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 6ffdbbf90937..daf5304e0d89 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1785,8 +1785,14 @@ void SwViewShell::PaintTile(VirtualDevice &rDevice, int contextWidth, int contex
Imp()->GetDrawView()->AddWindowToPaintView(&rDevice);
}
- // scroll the requested area into view if necessary
- MakeVisible(SwRect(Point(tilePosX, tilePosY), rDevice.PixelToLogic(Size(contextWidth, contextHeight))));
+ // Make the requested area visible -- we can't use MakeVisible as that will
+ // only scroll the contents, but won't zoom/resize if needed.
+ // Without this, items/text that are outside the visible area (in the SwView)
+ // won't be painted when rendering tiles (at least when using either the
+ // tiledrendering app, or the gtktiledviewer) -- although ultimately we
+ // probably want to fix things so that the SwView's area doesn't affect
+ // tiled rendering?
+ VisPortChgd(SwRect(Point(tilePosX, tilePosY), rDevice.PixelToLogic(Size(contextWidth, contextHeight))));
// draw - works in logic coordinates
Paint(Rectangle(Point(tilePosX, tilePosY), rDevice.PixelToLogic(Size(contextWidth, contextHeight))));