From 906945681773d9af3b46006e4f661993edc3e871 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Wed, 14 Jan 2015 18:35:48 +0100 Subject: SwViewShell::PaintTile: paint a small red rectangle as well in debug mode Change-Id: I246965ac341ef0deeb30f1d3a0c518e67a074869 --- sw/source/core/view/viewsh.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 -- cgit