[Libreoffice-commits] core.git: Branch 'feature/gsoc-tiled-rendering' - libreofficekit/source
Pranav Kant
pranavk at gnome.org
Tue Jun 23 03:17:26 PDT 2015
libreofficekit/source/gtk/tilebuffer.cxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit fd4c17f5fcede7730f88b193471808d30a7a15f7
Author: Pranav Kant <pranavk at gnome.org>
Date: Tue Jun 23 14:37:09 2015 +0530
tilebuffer: Add timer to measure paintTile() call
Change-Id: I2645863c7445e17d77e2c4e2dc24e22f8685034e
diff --git a/libreofficekit/source/gtk/tilebuffer.cxx b/libreofficekit/source/gtk/tilebuffer.cxx
index 3f22f98..60aa16f 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;
More information about the Libreoffice-commits
mailing list