[gegl] Move gegl_can_do_inplace_processing



commit d454a866ae5fa64dbc42f2b2cd34417f563f14ca
Author: Daniel Sabo <DanielSabo gmail com>
Date:   Tue May 21 19:52:41 2013 -0700

    Move gegl_can_do_inplace_processing
    
    Put it in a common header instead of using multiple definitions.

 gegl/operation/gegl-operation-point-composer.c |    4 ----
 gegl/operation/gegl-operation-point-filter.c   |   21 ---------------------
 gegl/operation/gegl-operation.h                |    6 +++---
 gegl/operation/gegl-operations.c               |   16 ++++++++++++++++
 4 files changed, 19 insertions(+), 28 deletions(-)
---
diff --git a/gegl/operation/gegl-operation-point-composer.c b/gegl/operation/gegl-operation-point-composer.c
index a95f381..4e606b4 100644
--- a/gegl/operation/gegl-operation-point-composer.c
+++ b/gegl/operation/gegl-operation-point-composer.c
@@ -79,10 +79,6 @@ gegl_operation_point_composer_init (GeglOperationPointComposer *self)
 
 }
 
-gboolean gegl_can_do_inplace_processing (GeglOperation       *operation,
-                                         GeglBuffer          *input,
-                                         const GeglRectangle *result);
-
 /* we replicate the process function from GeglOperationComposer to be
  * able to bail out earlier for some common processing time pitfalls
  */
diff --git a/gegl/operation/gegl-operation-point-filter.c b/gegl/operation/gegl-operation-point-filter.c
index b718708..1460560 100644
--- a/gegl/operation/gegl-operation-point-filter.c
+++ b/gegl/operation/gegl-operation-point-filter.c
@@ -191,27 +191,6 @@ gegl_operation_point_filter_process (GeglOperation       *operation,
   return TRUE;
 }
 
-gboolean gegl_can_do_inplace_processing (GeglOperation       *operation,
-                                         GeglBuffer          *input,
-                                         const GeglRectangle *result);
-
-gboolean gegl_can_do_inplace_processing (GeglOperation       *operation,
-                                         GeglBuffer          *input,
-                                         const GeglRectangle *result)
-{
-  if (!input ||
-      GEGL_IS_CACHE (input))
-    return FALSE;
-  if (gegl_object_get_has_forked (input))
-    return FALSE;
-
-  if (input->format == gegl_operation_get_format (operation, "output") &&
-      gegl_rectangle_contains (gegl_buffer_get_extent (input), result))
-    return TRUE;
-  return FALSE;
-}
-
-
 static gboolean gegl_operation_point_filter_op_process
                               (GeglOperation       *operation,
                                GeglOperationContext *context,
diff --git a/gegl/operation/gegl-operation.h b/gegl/operation/gegl-operation.h
index d86d1fa..51a60fa 100644
--- a/gegl/operation/gegl-operation.h
+++ b/gegl/operation/gegl-operation.h
@@ -265,9 +265,9 @@ gboolean gegl_operation_cl_set_kernel_args (GeglOperation *operation,
  * externally */
 gboolean gegl_operation_calc_need_rects      (GeglOperation       *operation,
                                               gpointer             context_id);
-void     gegl_operation_path_prop_changed    (GeglPath            *path,
-                                              GeglOperation       *operation);
-
+gboolean gegl_can_do_inplace_processing      (GeglOperation       *operation,
+                                              GeglBuffer          *input,
+                                              const GeglRectangle *result);
 G_END_DECLS
 
 /***
diff --git a/gegl/operation/gegl-operations.c b/gegl/operation/gegl-operations.c
index b2b010b..53da8ad 100644
--- a/gegl/operation/gegl-operations.c
+++ b/gegl/operation/gegl-operations.c
@@ -238,3 +238,19 @@ gegl_operation_calc_need_rects (GeglOperation *operation,
     }
   return TRUE;
 }
+
+gboolean gegl_can_do_inplace_processing (GeglOperation       *operation,
+                                         GeglBuffer          *input,
+                                         const GeglRectangle *result)
+{
+  if (!input ||
+      GEGL_IS_CACHE (input))
+    return FALSE;
+  if (gegl_object_get_has_forked (input))
+    return FALSE;
+
+  if (input->format == gegl_operation_get_format (operation, "output") &&
+      gegl_rectangle_contains (gegl_buffer_get_extent (input), result))
+    return TRUE;
+  return FALSE;
+}


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