Kaydet (Commit) fa377a06 authored tarafından Miklos Vajna's avatar Miklos Vajna

desktop: fix LOK_DEBUG rectangle painting

Change-Id: If023e409fad6fed8c0345a66ea48c1ed9924bff0
üst 81d9f1cb
...@@ -921,6 +921,19 @@ void doc_paintTile (LibreOfficeKitDocument* pThis, ...@@ -921,6 +921,19 @@ void doc_paintTile (LibreOfficeKitDocument* pThis,
pDoc->paintTile(*pDevice.get(), nCanvasWidth, nCanvasHeight, pDoc->paintTile(*pDevice.get(), nCanvasWidth, nCanvasHeight,
nTilePosX, nTilePosY, nTileWidth, nTileHeight); 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. // Overwrite pBuffer's alpha channel with the separate alpha buffer.
for (int nRow = 0; nRow < nCanvasHeight; ++nRow) for (int nRow = 0; nRow < nCanvasHeight; ++nRow)
{ {
...@@ -937,19 +950,6 @@ void doc_paintTile (LibreOfficeKitDocument* pThis, ...@@ -937,19 +950,6 @@ void doc_paintTile (LibreOfficeKitDocument* pThis,
#endif #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 #else
(void) pBuffer; (void) pBuffer;
(void) nCanvasWidth; (void) nCanvasWidth;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment