summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-01-14 18:35:48 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-01-16 13:18:29 +0100
commit906945681773d9af3b46006e4f661993edc3e871 (patch)
tree0975946d6c808ccad8b766f3c5719be0f7e296c8
parent58959bd1fc0b7ada7aa8386e698e2e5004a92cfb (diff)
SwViewShell::PaintTile: paint a small red rectangle as well in debug mode
Change-Id: I246965ac341ef0deeb30f1d3a0c518e67a074869
-rw-r--r--sw/source/core/view/viewsh.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 8647409d8848..ac49e5e6c5f6 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1824,6 +1824,19 @@ void SwViewShell::PaintTile(VirtualDevice &rDevice, int contextWidth, int contex
// SwViewShell's output device tear down
mpOut = pSaveOut;
mbTiledRendering = bTiledRendering;
+
+ static bool bDebug = getenv("SW_DEBUG_TILEDRENDERING") != 0;
+ if (bDebug)
+ {
+ // Draw a small red rectangle in the top left corner so that it's easy to see where a new tile begins.
+ Rectangle aRect(0, 0, 5, 5);
+ aRect = rDevice.PixelToLogic(aRect);
+ rDevice.Push(PushFlags::FILLCOLOR | PushFlags::LINECOLOR);
+ rDevice.SetFillColor(COL_LIGHTRED);
+ rDevice.SetLineColor();
+ rDevice.DrawRect(aRect);
+ rDevice.Pop();
+ }
}
#if !HAVE_FEATURE_DESKTOP