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



commit 90032c0e66860dbd019610f8ace84d69829cbace
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]