[gimp/goat-invasion: 66/325] app: avoid thrashing GEGL side of tile cache in projection
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/goat-invasion: 66/325] app: avoid thrashing GEGL side of tile cache in projection
- Date: Fri, 30 Mar 2012 09:39:48 +0000 (UTC)
commit 8b048446c60009b9180a030f4981423e07901364
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]