Blob Blame History Raw
From 74d4aa83ab2a936b4210dc249531240087e2fc84 Mon Sep 17 00:00:00 2001
From: Miklos Vajna <vmiklos@collabora.co.uk>
Date: Tue, 6 Oct 2015 10:47:03 +0200
Subject: [PATCH 182/398] lokdocview: log paintTile() arguments

Change-Id: I8015c8030c1c7f53ae1de053fe268a33464834ad
(cherry picked from commit 23ac7f2fb57c338fa608cbc28ac39d140026e3c3)
---
 libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx |  1 -
 libreofficekit/source/gtk/lokdocview.cxx            | 14 +++++++-------
 libreofficekit/source/gtk/tilebuffer.cxx            |  1 -
 3 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
index ed97a6743b38..3d0b0deba323 100644
--- a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
@@ -371,7 +371,6 @@ static void signalCommand(LOKDocView* pLOKDocView, char* pPayload, gpointer /*pD
     {
         std::string aKey = aPayload.substr(0, nPosition);
         std::string aValue = aPayload.substr(nPosition + 1);
-        g_info("signalCommand: '%s' is '%s'", aKey.c_str(), aValue.c_str());
 
         if (rWindow.m_aCommandNameToolItems.find(aKey) != rWindow.m_aCommandNameToolItems.end())
         {
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index 220e488a53a4..4026d958b8ed 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -1395,7 +1395,13 @@ paintTileInThread (gpointer data)
     aTileRectangle.y = pixelToTwip(nTileSizePixels, pLOEvent->m_fPaintTileZoom) * pLOEvent->m_nPaintTileX;
 
     priv->m_pDocument->pClass->setView(priv->m_pDocument, priv->m_nViewId);
-    g_test_timer_start();
+    std::stringstream ss;
+    ss << "lok::Document::paintTile(" << static_cast<void*>(pBuffer) << ", "
+        << nTileSizePixels << ", " << nTileSizePixels << ", "
+        << aTileRectangle.x << ", " << aTileRectangle.y << ", "
+        << pixelToTwip(nTileSizePixels, pLOEvent->m_fPaintTileZoom) << ", "
+        << pixelToTwip(nTileSizePixels, pLOEvent->m_fPaintTileZoom) << ")";
+    g_info(ss.str().c_str());
     priv->m_pDocument->pClass->paintTile(priv->m_pDocument,
                                          pBuffer,
                                          nTileSizePixels, nTileSizePixels,
@@ -1403,12 +1409,6 @@ paintTileInThread (gpointer data)
                                          pixelToTwip(nTileSizePixels, pLOEvent->m_fPaintTileZoom),
                                          pixelToTwip(nTileSizePixels, pLOEvent->m_fPaintTileZoom));
 
-    double elapsedTime = g_test_timer_elapsed();
-    g_info ("Rendered (%d, %d) in %f seconds",
-            pLOEvent->m_nPaintTileX,
-            pLOEvent->m_nPaintTileY,
-            elapsedTime);
-
     //create a mapping for it
     buffer.m_mTiles[index].setPixbuf(pPixBuf);
     buffer.m_mTiles[index].valid = true;
diff --git a/libreofficekit/source/gtk/tilebuffer.cxx b/libreofficekit/source/gtk/tilebuffer.cxx
index 687ef44d6468..0e81bc33f262 100644
--- a/libreofficekit/source/gtk/tilebuffer.cxx
+++ b/libreofficekit/source/gtk/tilebuffer.cxx
@@ -64,7 +64,6 @@ void TileBuffer::setInvalid(int x, int y, float fZoom, GTask* task,
                             GThreadPool* lokThreadPool)
 {
     int index = x * m_nWidth + y;
-    g_info("Setting tile invalid (%d, %d)", x, y);
     if (m_mTiles.find(index) != m_mTiles.end())
     {
         m_mTiles[index].valid = false;
-- 
2.12.0