summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPranav Kant <pranavk@gnome.org>2015-06-23 14:37:09 +0530
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2016-02-07 21:55:05 -0500
commitc98849c57cd666a5d4ae1b706e0432721d9c70d1 (patch)
tree40d9502a96febc143fc58a5b4980314c2babf6de
parentfe6f4b39ded49387d6e0c4c2f4a9b29694d460e2 (diff)
tilebuffer: Add timer to measure paintTile() call
Change-Id: I2645863c7445e17d77e2c4e2dc24e22f8685034e (cherry picked from commit 580c70883ca8c9bc73ea42cb05983b9df57f55ff)
-rw-r--r--libreofficekit/source/gtk/tilebuffer.cxx5
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;