[Libreoffice-commits] core.git: desktop/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Nov 8 13:40:04 UTC 2018
desktop/source/lib/init.cxx | 13 +++++++++++++
1 file changed, 13 insertions(+)
New commits:
commit d2c7b86be879fe33ce170727421a19370ba8884d
Author: Jan Holesovsky <kendy at collabora.com>
AuthorDate: Wed Oct 24 21:41:02 2018 +0200
Commit: Jan Holesovsky <kendy at collabora.com>
CommitDate: Thu Nov 8 14:38:10 2018 +0100
Revert "The debugging rectangles are not needed any more."
Still useful for debugging, particularly in combination with
gtktiledviewer.
This reverts commit dec025d4cb51f252ecd7e981fe36800cf2bedff5.
Change-Id: Id2174486c0427adf083be199ce2dbb453beb8f22
Reviewed-on: https://gerrit.libreoffice.org/63030
Tested-by: Jenkins
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index baa87e12ca97..202bf279f153 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2152,6 +2152,19 @@ static void doc_paintTile(LibreOfficeKitDocument* pThis,
pDoc->paintTile(*pDevice.get(), nCanvasWidth, nCanvasHeight,
nTilePosX, nTilePosY, nTileWidth, nTileHeight);
+
+ static bool bDebug = getenv("LOK_DEBUG_TILES") != nullptr;
+ if (bDebug)
+ {
+ // Draw a small red rectangle in the top left corner so that it's easy to see where a new tile begins.
+ tools::Rectangle aRect(0, 0, 5, 5);
+ aRect = pDevice->PixelToLogic(aRect);
+ pDevice->Push(PushFlags::FILLCOLOR | PushFlags::LINECOLOR);
+ pDevice->SetFillColor(COL_LIGHTRED);
+ pDevice->SetLineColor();
+ pDevice->DrawRect(aRect);
+ pDevice->Pop();
+ }
#endif
#else
More information about the Libreoffice-commits
mailing list