diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-02-24 17:04:24 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-03-02 08:50:53 +0100 |
commit | 80ac88cc00e7d85ee971205de0310760f70f31cd (patch) | |
tree | badcfa1a26c78baba2a0717b5eb6d3fb312a402d /desktop | |
parent | 0933cad5cf156717614f8532ba8a7ed7208cc3ff (diff) |
desktop: move tiled rendering debug code from sw
So that the size / position is more clear in other apps as well.
Change-Id: If1fd9ac8e6ddc83b41c06e3b88ae34765a5c7c75
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/lib/init.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 3acb7bf1f0c7..4aea3d044c4e 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -628,6 +628,19 @@ void doc_paintTile (LibreOfficeKitDocument* pThis, (void) pRowStride; #endif + static bool bDebug = getenv("LOK_DEBUG") != 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 = aDevice.PixelToLogic(aRect); + aDevice.Push(PushFlags::FILLCOLOR | PushFlags::LINECOLOR); + aDevice.SetFillColor(COL_LIGHTRED); + aDevice.SetLineColor(); + aDevice.DrawRect(aRect); + aDevice.Pop(); + } + #else (void) pBuffer; (void) nCanvasWidth; |