[gimp/goat-invasion: 66/526] app: avoid thrashing GEGL side of tile cache in projection



commit 71dabb5d6b85e766d5ccb426a364d9d766264796
Author: Ãyvind KolÃs <pippin gimp org>
Date:   Fri Mar 16 01:07:01 2012 +0000

    app: avoid thrashing GEGL side of tile cache in projection
    
    gimp_projection_initialize was causing the projection code to throw out all
    it's tiles continously, causing crawling updates.

 app/core/gimpprojection-construct.c |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/app/core/gimpprojection-construct.c b/app/core/gimpprojection-construct.c
index 23d022e..696ee7b 100644
--- a/app/core/gimpprojection-construct.c
+++ b/app/core/gimpprojection-construct.c
@@ -251,13 +251,21 @@ gimp_projection_initialize (GimpProjection *proj,
 
   if (! coverage)
     {
-      TileManager   *tiles;
       GeglBuffer    *buffer;
       GeglRectangle  rect = { x, y, w, h };
 
-      tiles = gimp_pickable_get_tiles (GIMP_PICKABLE (proj));
+      if (proj->use_gegl)
+        {
+          g_assert (proj->sink_node);
+          gegl_node_get (proj->sink_node, "buffer", &buffer, NULL);
+        }
+      else
+        {
+          TileManager *tiles = gimp_pickable_get_tiles (GIMP_PICKABLE (proj));
+
+          buffer = gimp_tile_manager_create_buffer (tiles, TRUE);
+        }
 
-      buffer = gimp_tile_manager_create_buffer (tiles, TRUE);
       gegl_buffer_clear (buffer, &rect);
       g_object_unref (buffer);
     }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]