gegl r1810 - in trunk: . gegl/process



Author: ok
Date: Sun Jan  6 16:20:09 2008
New Revision: 1810
URL: http://svn.gnome.org/viewvc/gegl?rev=1810&view=rev

Log:
* gegl/process/gegl-eval-visitor.c: (visit_pad): added some comments.


Modified:
   trunk/ChangeLog
   trunk/gegl/process/gegl-eval-visitor.c

Modified: trunk/ChangeLog
==============================================================================
--- trunk/ChangeLog	(original)
+++ trunk/ChangeLog	Sun Jan  6 16:20:09 2008
@@ -1,3 +1,7 @@
+2008-01-06  Ãyvind KolÃs  <pippin gimp org>
+
+	* gegl/process/gegl-eval-visitor.c: (visit_pad): added some comments.
+
 2008-01-06  Michael Natterer  <mitch gimp org>
 
 	* gegl/buffer/gegl-buffer-allocator.h

Modified: trunk/gegl/process/gegl-eval-visitor.c
==============================================================================
--- trunk/gegl/process/gegl-eval-visitor.c	(original)
+++ trunk/gegl/process/gegl-eval-visitor.c	Sun Jan  6 16:20:09 2008
@@ -57,6 +57,7 @@
 
 extern long babl_total_usecs;
 
+/* this is the visitor that does the real computations for GEGL */
 static void
 visit_pad (GeglVisitor *self,
            GeglPad     *pad)
@@ -70,14 +71,21 @@
 
   if (gegl_pad_is_output (pad))
     {
+      /* processing only really happens for output pads */
       if (context->cached)
-        {
+        { /* unless we've got a cache valid for the requested region 
+           * that has not been invalidated, (the validity of the cache
+           * is determined by other visitors)
+           */
           gegl_node_context_get_target (context, pad->name);
+          /* XXX: why is the _get_target call needed anyways? */
         }
       else
         {
           glong time      = gegl_ticks ();
           glong babl_time = babl_total_usecs;
+
+          /* Make the operation do it's actual processing */
           gegl_operation_process (operation, context, gegl_pad_get_name (pad),
                                   &context->result_rect);
           babl_time = babl_total_usecs - babl_time;
@@ -86,8 +94,11 @@
           gegl_instrument ("process", gegl_node_get_operation (node), time);
           gegl_instrument (gegl_node_get_operation (node), "babl", babl_time);
 
-          if (node->cache) 
-            { 
+          if (node->cache)
+            {
+              /* if we've got a cache, notify the cache that parts
+               * of it has been computed
+               */
               gegl_cache_computed (node->cache, &context->result_rect);
             }
         }
@@ -96,6 +107,9 @@
     {
       GeglPad *source_pad = gegl_pad_get_internal_connected_to (pad);
 
+      /* the work needed to be done on input pads is to set the
+       * data from the corresponding output pad it is connected to
+       */
       if (source_pad)
         {
           GValue           value          = { 0 };



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