[Libreoffice-commits] core.git: Branch 'feature/gsoc-tiled-rendering' - libreofficekit/source

Pranav Kant pranavk at gnome.org
Sat Jul 25 08:52:54 PDT 2015


 libreofficekit/source/gtk/lokdocview.cxx |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 298219da1e653e30f49bf29ee806451cb0607a9b
Author: Pranav Kant <pranavk at gnome.org>
Date:   Sat Jul 25 21:21:34 2015 +0530

    lokdocview: Cannot use same GTask object for all calls.
    
    Change-Id: I875d49a9e4360659087ae70456edefb15bc57b20

diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index 60bdbd4..825eb10 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -475,12 +475,15 @@ setTilesInvalid (LOKDocView* pDocView, const GdkRectangle& rRectangle)
     aStart.y = aRectanglePixels.x / nTileSizePixels;
     aEnd.x = (aRectanglePixels.y + aRectanglePixels.height + nTileSizePixels) / nTileSizePixels;
     aEnd.y = (aRectanglePixels.x + aRectanglePixels.width + nTileSizePixels) / nTileSizePixels;
-    GTask* task = g_task_new(pDocView, NULL, NULL, NULL);
     for (int i = aStart.x; i < aEnd.x; i++)
+    {
         for (int j = aStart.y; j < aEnd.y; j++)
+        {
+            GTask* task = g_task_new(pDocView, NULL, NULL, NULL);
             priv->m_aTileBuffer.setInvalid(i, j, priv->m_fZoom, task);
-
-    g_object_unref(task);
+            g_object_unref(task);
+        }
+    }
 }
 
 static gboolean


More information about the Libreoffice-commits mailing list