lokdocview: Add debug info; paintTile rendering time
Change-Id: Icdb14e9a5fedb3dcfbad502e323b333c3dbcc534
This commit is contained in:
parent
0761614ccf
commit
0241896fad
1 changed files with 9 additions and 1 deletions
|
@ -1914,18 +1914,26 @@ paintTileInThread (gpointer data)
|
||||||
|
|
||||||
priv->m_pDocument->pClass->setView(priv->m_pDocument, priv->m_nViewId);
|
priv->m_pDocument->pClass->setView(priv->m_pDocument, priv->m_nViewId);
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
|
GTimer* aTimer = g_timer_new();
|
||||||
|
gulong nElapsedMs;
|
||||||
ss << "lok::Document::paintTile(" << static_cast<void*>(pBuffer) << ", "
|
ss << "lok::Document::paintTile(" << static_cast<void*>(pBuffer) << ", "
|
||||||
<< nTileSizePixels << ", " << nTileSizePixels << ", "
|
<< nTileSizePixels << ", " << nTileSizePixels << ", "
|
||||||
<< aTileRectangle.x << ", " << aTileRectangle.y << ", "
|
<< aTileRectangle.x << ", " << aTileRectangle.y << ", "
|
||||||
<< pixelToTwip(nTileSizePixels, pLOEvent->m_fPaintTileZoom) << ", "
|
<< pixelToTwip(nTileSizePixels, pLOEvent->m_fPaintTileZoom) << ", "
|
||||||
<< pixelToTwip(nTileSizePixels, pLOEvent->m_fPaintTileZoom) << ")";
|
<< pixelToTwip(nTileSizePixels, pLOEvent->m_fPaintTileZoom) << ")";
|
||||||
g_info("%s", ss.str().c_str());
|
|
||||||
priv->m_pDocument->pClass->paintTile(priv->m_pDocument,
|
priv->m_pDocument->pClass->paintTile(priv->m_pDocument,
|
||||||
pBuffer,
|
pBuffer,
|
||||||
nTileSizePixels, nTileSizePixels,
|
nTileSizePixels, nTileSizePixels,
|
||||||
aTileRectangle.x, aTileRectangle.y,
|
aTileRectangle.x, aTileRectangle.y,
|
||||||
pixelToTwip(nTileSizePixels, pLOEvent->m_fPaintTileZoom),
|
pixelToTwip(nTileSizePixels, pLOEvent->m_fPaintTileZoom),
|
||||||
pixelToTwip(nTileSizePixels, pLOEvent->m_fPaintTileZoom));
|
pixelToTwip(nTileSizePixels, pLOEvent->m_fPaintTileZoom));
|
||||||
|
|
||||||
|
g_timer_elapsed(aTimer, &nElapsedMs);
|
||||||
|
ss << " rendered in " << (nElapsedMs / 1000.) << " milliseconds";
|
||||||
|
g_info("%s", ss.str().c_str());
|
||||||
|
g_timer_destroy(aTimer);
|
||||||
|
|
||||||
cairo_surface_mark_dirty(pSurface);
|
cairo_surface_mark_dirty(pSurface);
|
||||||
|
|
||||||
// Its likely that while the tilebuffer has changed, one of the paint tile
|
// Its likely that while the tilebuffer has changed, one of the paint tile
|
||||||
|
|
Loading…
Reference in a new issue