[gegl] rename gegl-eval-mgr to gegl-eval-manager



commit 07d9ad8c488fbe2b8e7ea4b39f665b985e8d8d9a
Author: Michael Murà <batolettre gmail com>
Date:   Thu Jun 7 18:37:51 2012 +0900

    rename gegl-eval-mgr to gegl-eval-manager

 gegl/gegl-apply.c                                  |    2 +-
 gegl/gegl-types-internal.h                         |    2 +-
 gegl/graph/gegl-node.c                             |   44 ++++++++--------
 gegl/process/Makefile.am                           |    5 +-
 .../{gegl-eval-mgr.c => gegl-eval-manager.c}       |   56 ++++++++++----------
 .../{gegl-eval-mgr.h => gegl-eval-manager.h}       |   36 ++++++------
 6 files changed, 72 insertions(+), 73 deletions(-)
---
diff --git a/gegl/gegl-apply.c b/gegl/gegl-apply.c
index 0235faa..3cb7f2d 100644
--- a/gegl/gegl-apply.c
+++ b/gegl/gegl-apply.c
@@ -36,7 +36,7 @@
 #include "operation/gegl-operation-meta.h"
 #include "operation/gegl-operation-point-filter.h"
 
-#include "process/gegl-eval-mgr.h"
+#include "process/gegl-eval-manager.h"
 #include "process/gegl-have-visitor.h"
 #include "process/gegl-prepare-visitor.h"
 #include "process/gegl-finish-visitor.h"
diff --git a/gegl/gegl-types-internal.h b/gegl/gegl-types-internal.h
index 668f868..ca018da 100644
--- a/gegl/gegl-types-internal.h
+++ b/gegl/gegl-types-internal.h
@@ -24,7 +24,7 @@ G_BEGIN_DECLS
 
 typedef struct _GeglCRVisitor        GeglCRVisitor;
 typedef struct _GeglDebugRectVisitor GeglDebugRectVisitor;
-typedef struct _GeglEvalMgr          GeglEvalMgr;
+typedef struct _GeglEvalManager      GeglEvalManager;
 typedef struct _GeglEvalVisitor      GeglEvalVisitor;
 typedef struct _GeglFinishVisitor    GeglFinishVisitor;
 typedef struct _GeglGraph            GeglGraph;
diff --git a/gegl/graph/gegl-node.c b/gegl/graph/gegl-node.c
index 7563abd..731f0cf 100644
--- a/gegl/graph/gegl-node.c
+++ b/gegl/graph/gegl-node.c
@@ -39,7 +39,7 @@
 #include "operation/gegl-operations.h"
 #include "operation/gegl-operation-meta.h"
 
-#include "process/gegl-eval-mgr.h"
+#include "process/gegl-eval-manager.h"
 #include "process/gegl-have-visitor.h"
 #include "process/gegl-prepare-visitor.h"
 #include "process/gegl-finish-visitor.h"
@@ -64,14 +64,14 @@ enum
 
 struct _GeglNodePrivate
 {
-  GSList         *source_connections;
-  GSList         *sink_connections;
-  GSList         *children;  /*  used for children */
-  GeglNode       *parent;
-  gchar          *name;
-  GeglProcessor  *processor;
-  GHashTable     *contexts;
-  GeglEvalMgr    *eval_mgr[GEGL_MAX_THREADS];
+  GSList          *source_connections;
+  GSList          *sink_connections;
+  GSList          *children;  /*  used for children */
+  GeglNode        *parent;
+  gchar           *name;
+  GeglProcessor   *processor;
+  GHashTable      *contexts;
+  GeglEvalManager *eval_manager[GEGL_MAX_THREADS];
 };
 
 
@@ -235,10 +235,10 @@ gegl_node_dispose (GObject *gobject)
   {
     gint i;
     for (i=0; i<GEGL_MAX_THREADS; i++)
-      if (self->priv->eval_mgr[i])
+      if (self->priv->eval_manager[i])
         {
-          g_object_unref (self->priv->eval_mgr[i]);
-          self->priv->eval_mgr[i] = NULL;
+          g_object_unref (self->priv->eval_manager[i]);
+          self->priv->eval_manager[i] = NULL;
         }
   }
 
@@ -863,16 +863,16 @@ gegl_node_link_many (GeglNode *source,
   va_end (var_args);
 }
 
-static void gegl_node_ensure_eval_mgr (GeglNode    *self,
+static void gegl_node_ensure_eval_manager (GeglNode    *self,
                                        const gchar *pad,
                                        gint         no)
 {
-  if (!self->priv->eval_mgr[no])
-    self->priv->eval_mgr[no] = gegl_eval_mgr_new (self, pad);
+  if (!self->priv->eval_manager[no])
+    self->priv->eval_manager[no] = gegl_eval_manager_new (self, pad);
 }
 
-/* Will set the eval_mgr's roi to the supplied roi if defined, otherwise
- * it will use the node's bounding box. Then the gegl_eval_mgr_apply will
+/* Will set the eval_manager's roi to the supplied roi if defined, otherwise
+ * it will use the node's bounding box. Then the gegl_eval_manager_apply will
  * be called.
  */
 static GeglBuffer *
@@ -892,13 +892,13 @@ gegl_node_apply_roi (GeglNode            *self,
 
   if (roi)
     {
-      self->priv->eval_mgr[tid]->roi = *roi;
+      self->priv->eval_manager[tid]->roi = *roi;
     }
   else
     {
-      self->priv->eval_mgr[tid]->roi = gegl_node_get_bounding_box (self);
+      self->priv->eval_manager[tid]->roi = gegl_node_get_bounding_box (self);
     }
-  buffer = gegl_eval_mgr_apply (self->priv->eval_mgr[tid]);
+  buffer = gegl_eval_manager_apply (self->priv->eval_manager[tid]);
   return buffer;
 }
 
@@ -1009,7 +1009,7 @@ gegl_node_blit (GeglNode            *self,
         {
           data[i] = data[0];
           data[i].roi = *roi;
-          gegl_node_ensure_eval_mgr (self, "output", i);
+          gegl_node_ensure_eval_manager (self, "output", i);
           if (horizontal)
             {
               data[i].roi.width = roi->width / threads;
@@ -1056,7 +1056,7 @@ gegl_node_blit (GeglNode            *self,
     {
       GeglBuffer *buffer;
 
-      gegl_node_ensure_eval_mgr (self, "output", 0);
+      gegl_node_ensure_eval_manager (self, "output", 0);
       buffer = gegl_node_apply_roi (self, "output", roi, 0);
       if (buffer && destination_buf)
         {
diff --git a/gegl/process/Makefile.am b/gegl/process/Makefile.am
index 0f1a11c..8825366 100644
--- a/gegl/process/Makefile.am
+++ b/gegl/process/Makefile.am
@@ -19,7 +19,7 @@ noinst_LTLIBRARIES = libprocess.la
 libprocess_la_SOURCES = \
 	gegl-need-visitor.c		\
 	gegl-debug-rect-visitor.c	\
-	gegl-eval-mgr.c			\
+	gegl-eval-manager.c		\
 	gegl-eval-visitor.c		\
 	gegl-finish-visitor.c		\
 	gegl-have-visitor.c		\
@@ -28,7 +28,7 @@ libprocess_la_SOURCES = \
 	\
 	gegl-need-visitor.h		\
 	gegl-debug-rect-visitor.h	\
-	gegl-eval-mgr.h			\
+	gegl-eval-manager.h		\
 	gegl-eval-visitor.h		\
 	gegl-finish-visitor.h		\
 	gegl-have-visitor.h		\
@@ -36,4 +36,3 @@ libprocess_la_SOURCES = \
 	gegl-processor.h
 
 #libprocess_la_SOURCES = $(lib_process_sources) $(libprocess_public_HEADERS)
-
diff --git a/gegl/process/gegl-eval-mgr.c b/gegl/process/gegl-eval-manager.c
similarity index 82%
rename from gegl/process/gegl-eval-mgr.c
rename to gegl/process/gegl-eval-manager.c
index 27da126..bf9d82a 100644
--- a/gegl/process/gegl-eval-mgr.c
+++ b/gegl/process/gegl-eval-manager.c
@@ -23,7 +23,7 @@
 
 #include "gegl.h"
 #include "gegl-types-internal.h"
-#include "gegl-eval-mgr.h"
+#include "gegl-eval-manager.h"
 #include "gegl-eval-visitor.h"
 #include "gegl-debug-rect-visitor.h"
 #include "gegl-need-visitor.h"
@@ -38,22 +38,22 @@
 #include <stdlib.h>
 
 
-static void gegl_eval_mgr_class_init (GeglEvalMgrClass *klass);
-static void gegl_eval_mgr_init (GeglEvalMgr *self);
-static void gegl_eval_mgr_finalize (GObject *self_object);
+static void gegl_eval_manager_class_init (GeglEvalManagerClass *klass);
+static void gegl_eval_manager_init (GeglEvalManager *self);
+static void gegl_eval_manager_finalize (GObject *self_object);
 
-G_DEFINE_TYPE (GeglEvalMgr, gegl_eval_mgr, G_TYPE_OBJECT)
+G_DEFINE_TYPE (GeglEvalManager, gegl_eval_manager, G_TYPE_OBJECT)
 
 static void
-gegl_eval_mgr_class_init (GeglEvalMgrClass *klass)
+gegl_eval_manager_class_init (GeglEvalManagerClass *klass)
 {
   GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
 
-  gobject_class->finalize = gegl_eval_mgr_finalize;
+  gobject_class->finalize = gegl_eval_manager_finalize;
 }
 
 static void
-gegl_eval_mgr_init (GeglEvalMgr *self)
+gegl_eval_manager_init (GeglEvalManager *self)
 {
   GeglRectangle roi = { 0, 0, -1, -1 };
   gpointer     context_id = self;
@@ -68,9 +68,9 @@ gegl_eval_mgr_init (GeglEvalMgr *self)
 }
 
 static void
-gegl_eval_mgr_finalize (GObject *self_object)
+gegl_eval_manager_finalize (GObject *self_object)
 {
-  GeglEvalMgr *self = GEGL_EVAL_MGR (self_object);
+  GeglEvalManager *self = GEGL_EVAL_MANAGER (self_object);
 #if 0
   GeglNode    *root;
   GeglPad     *pad;
@@ -94,20 +94,20 @@ gegl_eval_mgr_finalize (GObject *self_object)
   g_object_unref (self->finish_visitor);
   g_free (self->pad_name);
 
-  G_OBJECT_CLASS (gegl_eval_mgr_parent_class)->finalize (self_object);
+  G_OBJECT_CLASS (gegl_eval_manager_parent_class)->finalize (self_object);
 }
 
 static gboolean
-gegl_eval_mgr_change_notification (GObject             *gobject,
-                                   const GeglRectangle *rect,
-                                   gpointer             user_data)
+gegl_eval_manager_change_notification (GObject             *gobject,
+                                       const GeglRectangle *rect,
+                                       gpointer             user_data)
 {
-  GeglEvalMgr *mgr = GEGL_EVAL_MGR (user_data);
+  GeglEvalManager *manager = GEGL_EVAL_MANAGER (user_data);
 
-  if (mgr->node != NULL)
+  if (manager->node != NULL)
     {
-      gpointer              context_id = mgr;
-      GeglOperationContext *context    = gegl_node_get_context (mgr->node,
+      gpointer              context_id = manager;
+      GeglOperationContext *context    = gegl_node_get_context (manager->node,
                                                                 context_id);
       if (context != NULL)
         {
@@ -116,9 +116,9 @@ gegl_eval_mgr_change_notification (GObject             *gobject,
         }
     }
 
-  if (mgr->state != UNINITIALIZED)
+  if (manager->state != UNINITIALIZED)
     {
-      mgr->state = NEED_REDO_PREPARE_AND_HAVE_RECT_TRAVERSAL;
+      manager->state = NEED_REDO_PREPARE_AND_HAVE_RECT_TRAVERSAL;
     }
 
   return FALSE;
@@ -126,7 +126,7 @@ gegl_eval_mgr_change_notification (GObject             *gobject,
 
 
 GeglBuffer *
-gegl_eval_mgr_apply (GeglEvalMgr *self)
+gegl_eval_manager_apply (GeglEvalManager *self)
 {
   GeglNode    *root;
   GeglBuffer  *object;
@@ -134,7 +134,7 @@ gegl_eval_mgr_apply (GeglEvalMgr *self)
   glong        time       = gegl_ticks ();
   gpointer     context_id = self;
 
-  g_assert (GEGL_IS_EVAL_MGR (self));
+  g_assert (GEGL_IS_EVAL_MANAGER (self));
 
   gegl_instrument ("gegl", "process", 0);
 
@@ -246,18 +246,18 @@ gegl_eval_mgr_apply (GeglEvalMgr *self)
   return object;
 }
 
-GeglEvalMgr * gegl_eval_mgr_new     (GeglNode *node,
-                                     const gchar *pad_name)
+GeglEvalManager * gegl_eval_manager_new     (GeglNode    *node,
+                                             const gchar *pad_name)
 {
-  GeglEvalMgr *self = g_object_new (GEGL_TYPE_EVAL_MGR, NULL);
+  GeglEvalManager *self = g_object_new (GEGL_TYPE_EVAL_MANAGER, NULL);
   g_assert (GEGL_IS_NODE (node));
   self->node = node;
   if (pad_name)
     self->pad_name = g_strdup (pad_name);
   else
     self->pad_name = g_strdup ("output");
-  /*g_signal_connect (G_OBJECT (self->node->operation), "notify", G_CALLBACK (gegl_eval_mgr_change_notification), self);*/
-  g_signal_connect (G_OBJECT (self->node), "invalidated", G_CALLBACK (gegl_eval_mgr_change_notification), self);
-  g_signal_connect (G_OBJECT (self->node), "notify", G_CALLBACK (gegl_eval_mgr_change_notification), self);
+  /*g_signal_connect (G_OBJECT (self->node->operation), "notify", G_CALLBACK (gegl_eval_manager_change_notification), self);*/
+  g_signal_connect (G_OBJECT (self->node), "invalidated", G_CALLBACK (gegl_eval_manager_change_notification), self);
+  g_signal_connect (G_OBJECT (self->node), "notify", G_CALLBACK (gegl_eval_manager_change_notification), self);
   return self;
 }
diff --git a/gegl/process/gegl-eval-mgr.h b/gegl/process/gegl-eval-manager.h
similarity index 56%
rename from gegl/process/gegl-eval-mgr.h
rename to gegl/process/gegl-eval-manager.h
index 13cb9b4..bd7263c 100644
--- a/gegl/process/gegl-eval-mgr.h
+++ b/gegl/process/gegl-eval-manager.h
@@ -16,8 +16,8 @@
  * Copyright 2003 Calvin Williamson
  */
 
-#ifndef __GEGL_EVAL_MGR_H__
-#define __GEGL_EVAL_MGR_H__
+#ifndef __GEGL_EVAL_MANAGER_H__
+#define __GEGL_EVAL_MANAGER_H__
 
 #include "gegl-types-internal.h"
 #include "buffer/gegl-buffer-types.h"
@@ -38,20 +38,20 @@ typedef enum
    * nodes
    */
   NEED_CONTEXT_SETUP_TRAVERSAL
-} GeglEvalMgrStates;
+} GeglEvalManagerStates;
 
 
-#define GEGL_TYPE_EVAL_MGR            (gegl_eval_mgr_get_type ())
-#define GEGL_EVAL_MGR(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_EVAL_MGR, GeglEvalMgr))
-#define GEGL_EVAL_MGR_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  GEGL_TYPE_EVAL_MGR, GeglEvalMgrClass))
-#define GEGL_IS_EVAL_MGR(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_EVAL_MGR))
-#define GEGL_IS_EVAL_MGR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),  GEGL_TYPE_EVAL_MGR))
-#define GEGL_EVAL_MGR_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),  GEGL_TYPE_EVAL_MGR, GeglEvalMgrClass))
+#define GEGL_TYPE_EVAL_MANAGER            (gegl_eval_manager_get_type ())
+#define GEGL_EVAL_MANAGER(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_EVAL_MANAGER, GeglEvalManager))
+#define GEGL_EVAL_MANAGER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  GEGL_TYPE_EVAL_MANAGER, GeglEvalManagerClass))
+#define GEGL_IS_EVAL_MANAGER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_EVAL_MANAGER))
+#define GEGL_IS_EVAL_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),  GEGL_TYPE_EVAL_MANAGER))
+#define GEGL_EVAL_MANAGER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),  GEGL_TYPE_EVAL_MANAGER, GeglEvalManagerClass))
 
 
-typedef struct _GeglEvalMgrClass GeglEvalMgrClass;
+typedef struct _GeglEvalManagerClass GeglEvalManagerClass;
 
-struct _GeglEvalMgr
+struct _GeglEvalManager
 {
   GObject    parent_instance;
   GeglNode  *node;
@@ -61,7 +61,7 @@ struct _GeglEvalMgr
   /* whether we can fire off rendering requests straight
    * away or we have to re-prepare etc of the graph
    */
-  GeglEvalMgrStates state;
+  GeglEvalManagerStates state;
 
   /* we keep these objects around, they are too expensive to throw away */
   GeglVisitor *prepare_visitor;
@@ -72,18 +72,18 @@ struct _GeglEvalMgr
 
 };
 
-struct _GeglEvalMgrClass
+struct _GeglEvalManagerClass
 {
   GObjectClass  parent_class;
 };
 
 
-GType        gegl_eval_mgr_get_type (void) G_GNUC_CONST;
+GType             gegl_eval_manager_get_type (void) G_GNUC_CONST;
 
-GeglBuffer * gegl_eval_mgr_apply    (GeglEvalMgr *self);
-GeglEvalMgr * gegl_eval_mgr_new     (GeglNode *node,
-                                     const gchar *pad_name);
+GeglBuffer *      gegl_eval_manager_apply    (GeglEvalManager *self);
+GeglEvalManager * gegl_eval_manager_new      (GeglNode        *node,
+                                              const gchar     *pad_name);
 
 G_END_DECLS
 
-#endif /* __GEGL_EVAL_MGR_H__ */
+#endif /* __GEGL_EVAL_MANAGER_H__ */



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