[gegl] Revert "eval_visitor: Set output to NULL for 0x0 rects"
- From: Daniel Sabo <daniels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] Revert "eval_visitor: Set output to NULL for 0x0 rects"
- Date: Tue, 21 May 2013 18:46:32 +0000 (UTC)
commit 623158d03388909a876797d629d359969e0e75f2
Author: Daniel Sabo <DanielSabo gmail com>
Date: Tue May 21 11:46:02 2013 -0700
Revert "eval_visitor: Set output to NULL for 0x0 rects"
This reverts commit c8512d2be3defff8eefbed953d3980984f665069.
gegl/process/gegl-eval-visitor.c | 60 ++++++++++++++++++++-----------------
1 files changed, 32 insertions(+), 28 deletions(-)
---
diff --git a/gegl/process/gegl-eval-visitor.c b/gegl/process/gegl-eval-visitor.c
index 83e31fd..92920ae 100644
--- a/gegl/process/gegl-eval-visitor.c
+++ b/gegl/process/gegl-eval-visitor.c
@@ -84,7 +84,7 @@ gegl_eval_visitor_visit_pad (GeglVisitor *self,
if ((context->result_rect.width == 0 || context->result_rect.height == 0))
{
/* 0px processing, bail */
- gegl_operation_context_take_object (context, "output", NULL);
+ gegl_operation_context_take_object (context, "output", G_OBJECT (gegl_buffer_new (NULL,
NULL)));
}
else
{
@@ -138,36 +138,40 @@ gegl_eval_visitor_visit_pad (GeglVisitor *self,
gegl_pad_get_name (source_pad),
&value);
- if (g_value_get_object (&value))
+ if (!g_value_get_object (&value) &&
+ !g_object_get_data (G_OBJECT (source_node), "graph"))
+ g_warning ("eval-visitor encountered a NULL buffer passed from: %s.%s-[%p]",
+ gegl_node_get_debug_name (source_node),
+ gegl_pad_get_name (source_pad),
+ g_value_get_object (&value));
+
+ gegl_operation_context_set_property (context,
+ gegl_pad_get_name (pad),
+ &value);
+ /* reference counting for this source dropped to zero, freeing up */
+ if (-- gegl_node_get_context (
+ gegl_pad_get_node (source_pad), context_id)->refs == 0 &&
+ g_value_get_object (&value))
{
- gegl_operation_context_set_property (context,
- gegl_pad_get_name (pad),
- &value);
- /* reference counting for this source dropped to zero, freeing up */
- if (-- gegl_node_get_context (
- gegl_pad_get_node (source_pad), context_id)->refs == 0 &&
- g_value_get_object (&value))
- {
- gegl_operation_context_remove_property (
- gegl_node_get_context (
- gegl_pad_get_node (source_pad), context_id),
- gegl_pad_get_name (source_pad));
- }
+ gegl_operation_context_remove_property (
+ gegl_node_get_context (
+ gegl_pad_get_node (source_pad), context_id),
+ gegl_pad_get_name (source_pad));
+ }
- g_value_unset (&value);
+ g_value_unset (&value);
- /* processing for sink operations that accepts partial consumption
- * and thus probably are being processed by the processor from the
- * this very operation.
- */
- if (GEGL_IS_OPERATION_SINK (operation) &&
- !gegl_operation_sink_needs_full (operation) &&
- context->result_rect.width > 0 && context->result_rect.height > 0)
- {
- GEGL_NOTE (GEGL_DEBUG_PROCESS, "Processing pad '%s' on \"%s\"", gegl_pad_get_name (pad),
gegl_node_get_debug_name (node));
- gegl_operation_process (operation, context, "output",
- &context->result_rect, context->level);
- }
+ /* processing for sink operations that accepts partial consumption
+ and thus probably are being processed by the processor from the
+ this very operation.
+ */
+ if (GEGL_IS_OPERATION_SINK (operation) &&
+ !gegl_operation_sink_needs_full (operation) &&
+ context->result_rect.width > 0 && context->result_rect.height > 0)
+ {
+ GEGL_NOTE (GEGL_DEBUG_PROCESS, "Processing pad '%s' on \"%s\"", gegl_pad_get_name (pad),
gegl_node_get_debug_name (node));
+ gegl_operation_process (operation, context, "output",
+ &context->result_rect, context->level);
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]