[gegl] Enabled in-place processing for point filters/composers



commit bc28410da5202d8f5c6d872c8ceaf5ef9e66f9fa
Author: �yvind Kolås <pippin gimp org>
Date:   Sun Nov 22 11:43:40 2009 +0000

    Enabled in-place processing for point filters/composers
    
    Needed to revert to duplicate registration of the in-place buffer with
    GeglBufferIterator.

 gegl/operation/gegl-operation-filter.c         |    6 ------
 gegl/operation/gegl-operation-point-composer.c |    6 +-----
 gegl/operation/gegl-operation-point-filter.c   |    6 +-----
 3 files changed, 2 insertions(+), 16 deletions(-)
---
diff --git a/gegl/operation/gegl-operation-filter.c b/gegl/operation/gegl-operation-filter.c
index 1ebf8a4..8c85024 100644
--- a/gegl/operation/gegl-operation-filter.c
+++ b/gegl/operation/gegl-operation-filter.c
@@ -187,12 +187,6 @@ gboolean gegl_can_passthrough (GeglOperation       *operation,
                                GeglBuffer          *input,
                                const GeglRectangle *result)
 {
-#if ENABLE_MT
-  /* pass through processing currently conflicts
-   * with in place processing.
-   */
-  return FALSE;
-#endif
   if (!input || 
       GEGL_IS_CACHE (input))
     return FALSE;
diff --git a/gegl/operation/gegl-operation-point-composer.c b/gegl/operation/gegl-operation-point-composer.c
index 3a973c9..0590cd3 100644
--- a/gegl/operation/gegl-operation-point-composer.c
+++ b/gegl/operation/gegl-operation-point-composer.c
@@ -146,11 +146,7 @@ gegl_operation_point_composer_process (GeglOperation       *operation,
   if ((result->width > 0) && (result->height > 0))
     {
       GeglBufferIterator *i = gegl_buffer_iterator_new (output, result, out_format, GEGL_BUFFER_WRITE);
-      gint read;
-      if (input != output)
-        read  = gegl_buffer_iterator_add (i, input,  result, in_format, GEGL_BUFFER_READ);
-      else
-        read = 0;
+      gint read  = gegl_buffer_iterator_add (i, input,  result, in_format, GEGL_BUFFER_READ);
 
       if (aux)
         {
diff --git a/gegl/operation/gegl-operation-point-filter.c b/gegl/operation/gegl-operation-point-filter.c
index ba2b760..7d8c336 100644
--- a/gegl/operation/gegl-operation-point-filter.c
+++ b/gegl/operation/gegl-operation-point-filter.c
@@ -78,11 +78,7 @@ gegl_operation_point_filter_process (GeglOperation       *operation,
   if ((result->width > 0) && (result->height > 0))
     {
       GeglBufferIterator *i = gegl_buffer_iterator_new (output, result, out_format, GEGL_BUFFER_WRITE);
-      gint read;
-      if (input != output)
-        read  = gegl_buffer_iterator_add (i, input,  result, in_format, GEGL_BUFFER_READ);
-      else
-        read = 0;
+      gint read  = gegl_buffer_iterator_add (i, input,  result, in_format, GEGL_BUFFER_READ);
       while (gegl_buffer_iterator_next (i))
            point_filter_class->process (operation, i->data[read], i->data[0], i->length, &i->roi[0]);
 



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