diff options
author | Pranav Kant <pranavk@gnome.org> | 2015-06-23 14:37:09 +0530 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-06-29 13:33:36 +0200 |
commit | 580c70883ca8c9bc73ea42cb05983b9df57f55ff (patch) | |
tree | a7731f2c63e04c68eeb34cd3552ce3e1c0080d3f /libreofficekit/source/gtk/tilebuffer.cxx | |
parent | da49b8339828c0ee27d999ac4201e0eb12a1a47f (diff) |
tilebuffer: Add timer to measure paintTile() call
Change-Id: I2645863c7445e17d77e2c4e2dc24e22f8685034e
Diffstat (limited to 'libreofficekit/source/gtk/tilebuffer.cxx')
-rw-r--r-- | libreofficekit/source/gtk/tilebuffer.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libreofficekit/source/gtk/tilebuffer.cxx b/libreofficekit/source/gtk/tilebuffer.cxx index 3f22f983d2ab..60aa16f6c50a 100644 --- a/libreofficekit/source/gtk/tilebuffer.cxx +++ b/libreofficekit/source/gtk/tilebuffer.cxx @@ -91,7 +91,7 @@ Tile& TileBuffer::getTile(int x, int y, float aZoom) aTileRectangle.x = pixelToTwip(nTileSizePixels, aZoom) * y; aTileRectangle.y = pixelToTwip(nTileSizePixels, aZoom) * x; - g_info ("Rendering (%d, %d)", x, y); + g_test_timer_start(); m_pLOKDocument->pClass->paintTile(m_pLOKDocument, pBuffer, nTileSizePixels, nTileSizePixels, @@ -99,6 +99,9 @@ Tile& TileBuffer::getTile(int x, int y, float aZoom) pixelToTwip(nTileSizePixels, aZoom), pixelToTwip(nTileSizePixels, aZoom)); + double elapsedTime = g_test_timer_elapsed(); + g_info ("Rendered (%d, %d) in %f seconds", x, y, elapsedTime); + //create a mapping for it m_mTiles[index].setPixbuf(pPixBuf); m_mTiles[index].valid = true; |