[gegl] buffer: further early bailing to avoid traversing full tile cache
- From: Ãyvind KolÃs <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] buffer: further early bailing to avoid traversing full tile cache
- Date: Sun, 1 Apr 2012 21:07:09 +0000 (UTC)
commit df4e2bcb426878b8da43d6fa7004d0fa907906ce
Author: Ãyvind KolÃs <pippin gimp org>
Date: Sun Apr 1 22:07:00 2012 +0100
buffer: further early bailing to avoid traversing full tile cache
gegl/buffer/gegl-tile-handler-cache.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
---
diff --git a/gegl/buffer/gegl-tile-handler-cache.c b/gegl/buffer/gegl-tile-handler-cache.c
index e789e51..79ad119 100644
--- a/gegl/buffer/gegl-tile-handler-cache.c
+++ b/gegl/buffer/gegl-tile-handler-cache.c
@@ -274,15 +274,18 @@ gegl_tile_handler_cache_command (GeglTileSource *tile_store,
if (gegl_cl_is_accelerated ())
gegl_buffer_cl_cache_flush2 (GEGL_TILE_HANDLER_CACHE (tile_store), NULL);
- for (link = g_queue_peek_head_link (cache_queue); link; link = link->next)
+ if (cache->count)
{
- CacheItem *item = link->data;
- GeglTile *tile = item->tile;
-
- if (tile != NULL &&
- item->handler == cache)
+ for (link = g_queue_peek_head_link (cache_queue); link; link = link->next)
{
- gegl_tile_store (tile);
+ CacheItem *item = link->data;
+ GeglTile *tile = item->tile;
+
+ if (tile != NULL &&
+ item->handler == cache)
+ {
+ gegl_tile_store (tile);
+ }
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]