diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-11-24 11:54:24 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-11-24 12:22:49 +0100 |
commit | fa377a06627bba0c995aae55b346bb9530ecdf7e (patch) | |
tree | 0b0799101542a4f575ce83e7ff84319b4e14095a /desktop/source/lib | |
parent | 81d9f1cbd634e54719dd288c5b0de2015d563b2a (diff) |
desktop: fix LOK_DEBUG rectangle painting
Change-Id: If023e409fad6fed8c0345a66ea48c1ed9924bff0
Diffstat (limited to 'desktop/source/lib')
-rw-r--r-- | desktop/source/lib/init.cxx | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 0a1844ac243b..8682ce810cc4 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -921,6 +921,19 @@ void doc_paintTile (LibreOfficeKitDocument* pThis, pDoc->paintTile(*pDevice.get(), nCanvasWidth, nCanvasHeight, nTilePosX, nTilePosY, nTileWidth, nTileHeight); + static bool bDebug = getenv("LOK_DEBUG") != 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. + 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(); + } + // Overwrite pBuffer's alpha channel with the separate alpha buffer. for (int nRow = 0; nRow < nCanvasHeight; ++nRow) { @@ -937,19 +950,6 @@ void doc_paintTile (LibreOfficeKitDocument* pThis, #endif - static bool bDebug = getenv("LOK_DEBUG") != 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. - 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(); - } - #else (void) pBuffer; (void) nCanvasWidth; |