[gegl/threaded-base-classes: 7/22] operation: refactor in_place handling to take place in base classes



commit e5b12fd38f1a43786b2f6f3a12027eaea7eabf4f
Author: Øyvind Kolås <pippin gimp org>
Date:   Tue Jun 24 08:13:49 2014 +0200

    operation: refactor in_place handling to take place in base classes
    
    Adding a flag to operation, that is used by the implementation/further
    subclass to declare that in-place processing should be done if possible. This
    also adds that capability to the base class of GIMPs layer modes.

 gegl/operation/gegl-operation-composer3.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gegl/operation/gegl-operation-composer3.c b/gegl/operation/gegl-operation-composer3.c
index 7a52849..4e47753 100644
--- a/gegl/operation/gegl-operation-composer3.c
+++ b/gegl/operation/gegl-operation-composer3.c
@@ -136,6 +136,12 @@ gegl_operation_composer3_process (GeglOperation        *operation,
     return TRUE;
   }
 
+  if (result->width == 0 || result->height == 0)
+  {
+    output = gegl_operation_context_get_target (context, "output");
+    return TRUE;
+  }
+
   input = gegl_operation_context_get_source (context, "input");
 
   if (op_class->want_in_place && 


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