[gegl] Fix bliting from a cached node (bug 722963)
- From: Daniel Sabo <daniels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] Fix bliting from a cached node (bug 722963)
- Date: Sat, 25 Jan 2014 20:19:57 +0000 (UTC)
commit 55e2d90313284ecd6ac8e17d2b6ac7cb4d846a84
Author: Daniel Sabo <DanielSabo gmail com>
Date: Sat Jan 25 11:51:08 2014 -0800
Fix bliting from a cached node (bug 722963)
When processing a cached node the result was moved to
operation_result but not the context's "output" pad.
Allow the operation_result object to leak out of the
loop so the final output can use it directly instead
of querying the context again.
gegl/process/gegl-graph-traversal.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/gegl/process/gegl-graph-traversal.c b/gegl/process/gegl-graph-traversal.c
index 3c281cd..458bf76 100644
--- a/gegl/process/gegl-graph-traversal.c
+++ b/gegl/process/gegl-graph-traversal.c
@@ -375,17 +375,19 @@ gegl_graph_process (GeglGraphTraversal *path)
GeglBuffer *result = NULL;
GeglOperationContext *context = NULL;
GeglOperationContext *last_context = NULL;
+ GeglBuffer *operation_result = NULL;
for (list_iter = path->dfs_path; list_iter; list_iter = list_iter->next)
{
GeglNode *node = GEGL_NODE (list_iter->data);
GeglOperation *operation = node->operation;
- GeglBuffer *operation_result = NULL;
g_return_val_if_fail (node, NULL);
g_return_val_if_fail (operation, NULL);
GEGL_INSTRUMENT_START();
+ operation_result = NULL;
+
if (last_context)
gegl_operation_context_purge (last_context);
@@ -458,9 +460,8 @@ gegl_graph_process (GeglGraphTraversal *path)
if (last_context)
{
- GValue *value = gegl_operation_context_get_value (context, "output");
- if (value)
- result = g_value_dup_object (value);
+ if (operation_result)
+ result = g_object_ref (operation_result);
else if (gegl_node_has_pad (last_context->operation->node, "output"))
result = g_object_ref (gegl_graph_get_shared_empty (path));
gegl_operation_context_purge (last_context);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]