[gegl/abyss: 17/22] node: set correct abyss for node cache buffer
- From: Ville Sokk <villesokk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl/abyss: 17/22] node: set correct abyss for node cache buffer
- Date: Thu, 2 Aug 2012 18:04:24 +0000 (UTC)
commit 9f97a46adad397e617ba7431500ded660027b258
Author: Ville Sokk <ville sokk gmail com>
Date: Sun Jul 8 20:01:16 2012 +0300
node: set correct abyss for node cache buffer
gegl/graph/gegl-node.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/gegl/graph/gegl-node.c b/gegl/graph/gegl-node.c
index b9c9bd3..5aaeeef 100644
--- a/gegl/graph/gegl-node.c
+++ b/gegl/graph/gegl-node.c
@@ -540,6 +540,7 @@ gegl_node_invalidated (GeglNode *node,
{
if (rect && clear_cache)
gegl_buffer_clear (GEGL_BUFFER (node->cache), rect);
+
gegl_cache_invalidate (node->cache, rect);
}
node->valid_have_rect = FALSE;
@@ -1763,6 +1764,9 @@ gegl_node_get_bounding_box (GeglNode *root)
g_object_unref (root);
g_free (id);
+ if (root->cache)
+ gegl_buffer_set_abyss (GEGL_BUFFER (root->cache), &root->have_rect);
+
root->valid_have_rect = TRUE;
return root->have_rect;
}
@@ -2036,8 +2040,9 @@ gegl_node_get_cache (GeglNode *node)
if (!node->cache)
{
- GeglPad *pad;
- const Babl *format;
+ GeglPad *pad;
+ const Babl *format;
+ GeglRectangle bounds = gegl_node_get_bounding_box (node);
/* XXX: it should be possible to have cache for other pads than
* only "output" pads
@@ -2045,6 +2050,7 @@ gegl_node_get_cache (GeglNode *node)
pad = gegl_node_get_pad (node, "output");
if (!pad)
return NULL;
+
format = gegl_pad_get_format (pad);
if (!format)
{
@@ -2055,6 +2061,9 @@ gegl_node_get_cache (GeglNode *node)
"node", node,
"format", format,
NULL);
+
+ gegl_buffer_set_abyss (GEGL_BUFFER (node->cache), &bounds);
+
g_signal_connect (G_OBJECT (node->cache), "computed",
(GCallback) gegl_node_computed_event,
node);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]