gegl r3032 - in trunk/gegl: graph process



Author: martinn
Date: Sat Apr 11 14:50:09 2009
New Revision: 3032
URL: http://svn.gnome.org/viewvc/gegl?rev=3032&view=rev

Log:
Remove most of the special treatment of input/output graph proxies

Remove most of the special treatment of input/output graph proxies. It
is better to have core logic as clean and possible and move special
treatment higher up in the architectural layers.

Modified:
   trunk/gegl/graph/gegl-node.c
   trunk/gegl/graph/gegl-pad.c
   trunk/gegl/process/gegl-cr-visitor.c
   trunk/gegl/process/gegl-finish-visitor.c
   trunk/gegl/process/gegl-prepare-visitor.c

Modified: trunk/gegl/graph/gegl-node.c
==============================================================================
--- trunk/gegl/graph/gegl-node.c	(original)
+++ trunk/gegl/graph/gegl-node.c	Sat Apr 11 14:50:09 2009
@@ -910,27 +910,7 @@
 
       source_node = gegl_connection_get_source_node (connection);
 
-      if (source_node->is_graph)
-        {
-          GeglNode *proxy = gegl_node_get_output_proxy (source_node, "output");
-
-          if (!g_slist_find (depends_on, proxy))
-            depends_on = g_slist_prepend (depends_on, proxy);
-        }
-      else if (!g_slist_find (depends_on, source_node))
-        {
-          depends_on = g_slist_prepend (depends_on, source_node);
-        }
-    }
-
-  if (gegl_node_get_name (self) &&
-      !strcmp (gegl_node_get_name (self), "proxynop-input"))
-    {
-      GeglGraph *graph = g_object_get_data (G_OBJECT (self), "graph");
-
-      if (graph)
-        depends_on = g_slist_concat (depends_on,
-                                     gegl_node_get_depends_on (GEGL_NODE (graph)));
+      depends_on = g_slist_prepend (depends_on, source_node);
     }
 
   return depends_on;

Modified: trunk/gegl/graph/gegl-pad.c
==============================================================================
--- trunk/gegl/graph/gegl-pad.c	(original)
+++ trunk/gegl/graph/gegl-pad.c	Sat Apr 11 14:50:09 2009
@@ -185,21 +185,6 @@
           depends_on = g_slist_prepend (depends_on,
                                         gegl_connection_get_source_pad (connection));
         }
-
-      /* FIXME: this add depends for all inputs of the graph, this is probably
-       * too much in some cases
-       */
-      if (!strcmp (gegl_node_get_name (self->node), "proxynop-input"))
-        {
-          GeglNode *graph = GEGL_NODE (g_object_get_data (G_OBJECT (self->node), "graph"));
-
-          for (iter = graph->sources; iter; iter = g_slist_next (iter))
-            {
-              GeglConnection *connection = iter->data;
-              depends_on = g_slist_prepend (depends_on,
-                                            gegl_connection_get_source_pad (connection));
-            }
-        }
     }
   else if (gegl_pad_is_output (self))
     {

Modified: trunk/gegl/process/gegl-cr-visitor.c
==============================================================================
--- trunk/gegl/process/gegl-cr-visitor.c	(original)
+++ trunk/gegl/process/gegl-cr-visitor.c	Sat Apr 11 14:50:09 2009
@@ -70,11 +70,4 @@
       context->result_rect = gegl_operation_get_cached_region (node->operation, &context->result_rect);
     }
   context->refs = gegl_node_get_num_sinks (node);
-
-  if (!strcmp (gegl_node_get_name (node), "proxynop-output"))
-    {
-      GeglNode *graph = g_object_get_data (G_OBJECT (node), "graph");
-      if (graph)
-        context->refs += gegl_node_get_num_sinks (graph);
-    }
 }

Modified: trunk/gegl/process/gegl-finish-visitor.c
==============================================================================
--- trunk/gegl/process/gegl-finish-visitor.c	(original)
+++ trunk/gegl/process/gegl-finish-visitor.c	Sat Apr 11 14:50:09 2009
@@ -57,23 +57,5 @@
 {
   GEGL_VISITOR_CLASS (gegl_finish_visitor_parent_class)->visit_node (self, node);
 
-  {
-    const gchar *name = gegl_node_get_name (node);
-    if (name && !strcmp (name, "proxynop-output"))
-      {
-        GeglGraph *graph = g_object_get_data (G_OBJECT (node), "graph");
-        g_assert (graph);
-        if (GEGL_NODE (graph)->operation)
-          {
-            /* issuing a finish on the graph, FIXME: we might need to do
-             * a cycle of finishs as deep as the nesting of graphs,.
-             * (or find a better way to do this) */
-
-            /* we probably do not need to recurse, prepare should have done that
-             * for us..*/
-          }
-      }
-  }
-
   gegl_node_remove_context (node, self->context_id);
 }

Modified: trunk/gegl/process/gegl-prepare-visitor.c
==============================================================================
--- trunk/gegl/process/gegl-prepare-visitor.c	(original)
+++ trunk/gegl/process/gegl-prepare-visitor.c	Sat Apr 11 14:50:09 2009
@@ -69,25 +69,6 @@
     g_warning ("hmm");
   gegl_node_add_context (node, self->context_id);
 
-  /* prepare the operation for the coming evaluation (all properties
-   * should be set now).
-   */
-  {
-    const gchar *name = gegl_node_get_name (node);
-    if (name && !strcmp (name, "proxynop-output"))
-      {
-        GeglGraph *graph = g_object_get_data (G_OBJECT (node), "graph");
-        g_assert (graph);
-        if (GEGL_NODE (graph)->operation)
-          {
-            /* issuing a prepare on the graph, FIXME: we might need to do
-             * a cycle of prepares as deep as the nesting of graphs,.
-             * (or find a better way to do this) */
-            gegl_operation_prepare (GEGL_NODE (graph)->operation);
-          }
-      }
-  }
-
   gegl_operation_prepare (operation);
   {
     /* initialise the "needed rectangle" to an empty one */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]