[gegl/wip/pippin/pipeline: 82/95] gegl: add pipeline storage to opcontext



commit 7ec2c86e50e6371fe54162f8d52566ead7fb93a3
Author: Øyvind Kolås <pippin gimp org>
Date:   Mon Jul 23 18:12:49 2018 +0200

    gegl: add pipeline storage to opcontext

 gegl/operation/gegl-operation-context-private.h |  3 ++-
 gegl/operation/gegl-operation-context.c         | 13 +++++++++++++
 gegl/operation/gegl-operation-context.h         |  7 +++++++
 3 files changed, 22 insertions(+), 1 deletion(-)
---
diff --git a/gegl/operation/gegl-operation-context-private.h b/gegl/operation/gegl-operation-context-private.h
index b624c4756..b5523ef89 100644
--- a/gegl/operation/gegl-operation-context-private.h
+++ b/gegl/operation/gegl-operation-context-private.h
@@ -23,7 +23,6 @@
 
 G_BEGIN_DECLS
 
-#include "gegl-operation.h"
 
 /**
  * When a node in a GEGL graph does processing, it needs context such
@@ -61,6 +60,8 @@ struct _GeglOperationContext
                                                                    2 = 1:4,
                                                                    4 = 1:8,
                                                                    6 = 1:16 .. */
+  PipeLine      *pipeline;
+
   GHashTable    *contexts;      /* to be able to look up the context of
                                    other nodes/ops in the graph we store the
                                    hashtable we will be stored in */
diff --git a/gegl/operation/gegl-operation-context.c b/gegl/operation/gegl-operation-context.c
index 59ba46992..ccb1bc5ef 100644
--- a/gegl/operation/gegl-operation-context.c
+++ b/gegl/operation/gegl-operation-context.c
@@ -413,6 +413,19 @@ gegl_operation_context_node_get_context (GeglOperationContext *context,
 }
 
 
+PipeLine *gegl_operation_context_get_pipeline (GeglOperationContext *context)
+{
+  if (!context) return NULL;
+  return context->pipeline;
+}
+void gegl_operation_context_set_pipeline (GeglOperationContext *context,
+                                          PipeLine             *pipeline)
+{
+  if (!context) return;
+  context->pipeline = pipeline;
+}
+
+
 GeglBuffer *
 gegl_operation_context_dup_input_maybe_copy (GeglOperationContext *context,
                                              const gchar          *padname,
diff --git a/gegl/operation/gegl-operation-context.h b/gegl/operation/gegl-operation-context.h
index 53af4736e..c5710415f 100644
--- a/gegl/operation/gegl-operation-context.h
+++ b/gegl/operation/gegl-operation-context.h
@@ -23,6 +23,8 @@
 
 G_BEGIN_DECLS
 
+typedef struct _PipeLine PipeLine;
+
 GeglBuffer     *gegl_operation_context_get_target      (GeglOperationContext *self,
                                                         const gchar          *padname);
 GeglBuffer     *gegl_operation_context_get_source      (GeglOperationContext *self,
@@ -57,6 +59,11 @@ GeglBuffer *    gegl_operation_context_dup_input_maybe_copy      (GeglOperationC
 GeglOperationContext *gegl_operation_context_node_get_context (GeglOperationContext *context,
                                                                GeglNode             *node);
 
+PipeLine *gegl_operation_context_get_pipeline (GeglOperationContext *context);
+
+void      gegl_operation_context_set_pipeline (GeglOperationContext *context,
+                                               PipeLine *pipeline);
+
 
 G_END_DECLS
 


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