[gegl] Mark node->cache as forked



commit f931a023571f2073adf379b85bb87793ba49dbea
Author: Daniel Sabo <DanielSabo gmail com>
Date:   Thu Dec 5 21:03:34 2013 -0800

    Mark node->cache as forked

 gegl/graph/gegl-node.c           |    2 ++
 gegl/operation/gegl-operations.c |    7 +++----
 2 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/gegl/graph/gegl-node.c b/gegl/graph/gegl-node.c
index 03664f5..bec9476 100644
--- a/gegl/graph/gegl-node.c
+++ b/gegl/graph/gegl-node.c
@@ -1802,6 +1802,8 @@ gegl_node_get_cache (GeglNode *node)
                                   "format", format,
                                   NULL);
 
+      gegl_object_set_has_forked (G_OBJECT (node->cache));
+
       gegl_node_get_bounding_box (node);
       gegl_buffer_set_extent (GEGL_BUFFER (node->cache), &node->have_rect);
 
diff --git a/gegl/operation/gegl-operations.c b/gegl/operation/gegl-operations.c
index f1f7c56..5615483 100644
--- a/gegl/operation/gegl-operations.c
+++ b/gegl/operation/gegl-operations.c
@@ -25,7 +25,7 @@
 
 #include "gegl.h"
 #include "gegl-types-internal.h"
-#include "gegl-cache.h"
+#include "gegl-debug.h"
 #include "gegl-operation.h"
 #include "gegl-operations.h"
 #include "gegl-operation-context.h"
@@ -179,13 +179,12 @@ gboolean gegl_can_do_inplace_processing (GeglOperation       *operation,
                                          GeglBuffer          *input,
                                          const GeglRectangle *result)
 {
-  if (!input ||
-      GEGL_IS_CACHE (input))
+  if (!input)
     return FALSE;
   if (gegl_object_get_has_forked (G_OBJECT (input)))
     return FALSE;
 
-  if (input->format == gegl_operation_get_format (operation, "output") &&
+  if (gegl_buffer_get_format (input) == 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]