[gegl] Actually void the pyramid in gegl_tile_void()



commit 7b4ef2b677c78cf27fcb985a00ac4f532f785140
Author: Daniel Sabo <DanielSabo gmail com>
Date:   Mon Oct 7 06:49:21 2013 -0700

    Actually void the pyramid in gegl_tile_void()

 gegl/buffer/gegl-tile-handler-cache.c |   11 +++++++----
 gegl/buffer/gegl-tile.c               |    6 ------
 2 files changed, 7 insertions(+), 10 deletions(-)
---
diff --git a/gegl/buffer/gegl-tile-handler-cache.c b/gegl/buffer/gegl-tile-handler-cache.c
index 9bb1d14..8dbfc1e 100644
--- a/gegl/buffer/gegl-tile-handler-cache.c
+++ b/gegl/buffer/gegl-tile-handler-cache.c
@@ -483,15 +483,18 @@ gegl_tile_handler_cache_void (GeglTileHandlerCache *cache,
   item = cache_lookup (cache, x, y, z);
   if (item)
     {
-      gegl_tile_void (item->tile);
       cache_total -= item->tile->size;
-      gegl_tile_unref (item->tile);
       g_queue_unlink (cache_queue, &item->link);
       g_hash_table_remove (cache_ht, item);
-      g_slice_free (CacheItem, item);
-      cache->count --;
+      cache->count--;
     }
   g_mutex_unlock (&mutex);
+
+  if (item)
+    {
+      gegl_tile_void (item->tile);
+      gegl_tile_unref (item->tile);
+    }
 }
 
 void
diff --git a/gegl/buffer/gegl-tile.c b/gegl/buffer/gegl-tile.c
index 3c3039a..76e3c5f 100644
--- a/gegl/buffer/gegl-tile.c
+++ b/gegl/buffer/gegl-tile.c
@@ -271,12 +271,6 @@ gegl_tile_void (GeglTile *tile)
 {
   gegl_tile_mark_as_stored (tile);
 
-  /* XXX FIXME this causes void_pyramid to do nothing, but is needed
-   * to avoid a deadlock in gegl_tile_handler_cache_void() which calls
-   * gegl_tile_void() while holding the cache mutex
-   */
-  tile->tile_storage = NULL;
-
   if (tile->z == 0)
     gegl_tile_void_pyramid (tile);
 }


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