From b93e166440a77eed30f383631e10c7060ec7dd74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Kol=C3=A5s?= Date: Fri, 16 Mar 2012 01:07:01 +0000 Subject: [PATCH] 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 file changed, 11 insertions(+), 3 deletions(-) diff --git a/app/core/gimpprojection-construct.c b/app/core/gimpprojection-construct.c index 23d022e872..696ee7b06f 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); }