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

desktop: move tiled rendering debug code from sw

So that the size / position is more clear in other apps as well.

Change-Id: If1fd9ac8e6ddc83b41c06e3b88ae34765a5c7c75
üst 0933cad5
......@@ -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;
......
......@@ -1828,19 +1828,6 @@ void SwViewShell::PaintTile(VirtualDevice &rDevice, int contextWidth, int contex
mpOut = pSaveOut;
mbInLibreOfficeKitCallback = false;
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
......
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