[gegl] buffer: add abyss policy to cl iterator



commit 199eded1a8061b3fba167d4a3048abfe80a92188
Author: Ãyvind KolÃs <pippin gimp org>
Date:   Mon Mar 26 18:19:16 2012 +0100

    buffer: add abyss policy to cl iterator

 gegl/buffer/gegl-buffer-cl-iterator.c          |   13 ++++++++-----
 gegl/buffer/gegl-buffer-cl-iterator.h          |    9 ++++++---
 gegl/operation/gegl-operation-point-composer.c |    6 +++---
 gegl/operation/gegl-operation-point-filter.c   |    4 ++--
 operations/common/box-blur.c                   |    6 +++---
 5 files changed, 22 insertions(+), 16 deletions(-)
---
diff --git a/gegl/buffer/gegl-buffer-cl-iterator.c b/gegl/buffer/gegl-buffer-cl-iterator.c
index a34b5a4..dae6c29 100644
--- a/gegl/buffer/gegl-buffer-cl-iterator.c
+++ b/gegl/buffer/gegl-buffer-cl-iterator.c
@@ -70,7 +70,8 @@ gegl_buffer_cl_iterator_add_2 (GeglBufferClIterator  *iterator,
                                gint                   left,
                                gint                   right,
                                gint                   top,
-                               gint                   bottom)
+                               gint                   bottom,
+                               GeglAbyssPolicy        abyss_policy)
 {
   GeglBufferClIterators *i = (gpointer)iterator;
   gint self = 0;
@@ -170,9 +171,10 @@ gegl_buffer_cl_iterator_add (GeglBufferClIterator  *iterator,
                              GeglBuffer            *buffer,
                              const GeglRectangle   *result,
                              const Babl            *format,
-                             guint                  flags)
+                             guint                  flags,
+                             GeglAbyssPolicy        abyss_policy)
 {
-  return gegl_buffer_cl_iterator_add_2 (iterator, buffer, result, format, flags, 0,0,0,0);
+  return gegl_buffer_cl_iterator_add_2 (iterator, buffer, result, format, flags, 0,0,0,0, abyss_policy);
 }
 
 #define OPENCL_USE_CACHE 1
@@ -582,12 +584,13 @@ GeglBufferClIterator *
 gegl_buffer_cl_iterator_new (GeglBuffer          *buffer,
                              const GeglRectangle *roi,
                              const Babl          *format,
-                             guint                flags)
+                             guint                flags,
+                             GeglAbyssPolicy      abyss_policy)
 {
   GeglBufferClIterator *i = (gpointer)g_slice_new0 (GeglBufferClIterators);
   /* Because the iterator is nulled above, we can forgo explicitly setting
    * i->is_finished to FALSE. */
-  gegl_buffer_cl_iterator_add (i, buffer, roi, format, flags);
+  gegl_buffer_cl_iterator_add (i, buffer, roi, format, flags, abyss_policy);
   return i;
 }
 
diff --git a/gegl/buffer/gegl-buffer-cl-iterator.h b/gegl/buffer/gegl-buffer-cl-iterator.h
index 69b9683..5e7558e 100644
--- a/gegl/buffer/gegl-buffer-cl-iterator.h
+++ b/gegl/buffer/gegl-buffer-cl-iterator.h
@@ -26,7 +26,8 @@ gint gegl_buffer_cl_iterator_add (GeglBufferClIterator  *iterator,
                                   GeglBuffer            *buffer,
                                   const GeglRectangle   *roi,
                                   const Babl            *format,
-                                  guint                  flags);
+                                  guint                  flags,
+                                  GeglAbyssPolicy        abyss_policy);
 
 gint gegl_buffer_cl_iterator_add_2 (GeglBufferClIterator  *iterator,
                                     GeglBuffer            *buffer,
@@ -36,12 +37,14 @@ gint gegl_buffer_cl_iterator_add_2 (GeglBufferClIterator  *iterator,
                                     gint                   left,
                                     gint                   right,
                                     gint                   top,
-                                    gint                   bottom);
+                                    gint                   bottom,
+                                    GeglAbyssPolicy        abyss_policy);
 
 gboolean gegl_buffer_cl_iterator_next (GeglBufferClIterator *iterator, gboolean *err);
 
 GeglBufferClIterator *gegl_buffer_cl_iterator_new (GeglBuffer          *buffer,
                                                    const GeglRectangle *roi,
                                                    const Babl          *format,
-                                                   guint                flags);
+                                                   guint                flags,
+                                                   GeglAbyssPolicy      abyss_policy);
 #endif
diff --git a/gegl/operation/gegl-operation-point-composer.c b/gegl/operation/gegl-operation-point-composer.c
index 16d2711..5740d26 100644
--- a/gegl/operation/gegl-operation-point-composer.c
+++ b/gegl/operation/gegl-operation-point-composer.c
@@ -167,11 +167,11 @@ gegl_operation_point_composer_cl_process (GeglOperation       *operation,
 
   /* Process */
   {
-    GeglBufferClIterator *i = gegl_buffer_cl_iterator_new (output,   result, out_format, GEGL_CL_BUFFER_WRITE);
-                  gint read = gegl_buffer_cl_iterator_add (i, input, result, in_format,  GEGL_CL_BUFFER_READ);
+    GeglBufferClIterator *i = gegl_buffer_cl_iterator_new (output,   result, out_format, GEGL_CL_BUFFER_WRITE, GEGL_ABYSS_NONE);
+                  gint read = gegl_buffer_cl_iterator_add (i, input, result, in_format,  GEGL_CL_BUFFER_READ, GEGL_ABYSS_NONE);
     if (aux)
       {
-        gint foo = gegl_buffer_cl_iterator_add (i, aux, result, aux_format,  GEGL_CL_BUFFER_READ);
+        gint foo = gegl_buffer_cl_iterator_add (i, aux, result, aux_format,  GEGL_CL_BUFFER_READ, GEGL_ABYSS_NONE);
 
         while (gegl_buffer_cl_iterator_next (i, &err))
           {
diff --git a/gegl/operation/gegl-operation-point-filter.c b/gegl/operation/gegl-operation-point-filter.c
index 9fc117f..211563e 100644
--- a/gegl/operation/gegl-operation-point-filter.c
+++ b/gegl/operation/gegl-operation-point-filter.c
@@ -109,8 +109,8 @@ gegl_operation_point_filter_cl_process (GeglOperation       *operation,
 
   /* Process */
   {
-    GeglBufferClIterator *i = gegl_buffer_cl_iterator_new (output,   result, out_format, GEGL_CL_BUFFER_WRITE);
-                  gint read = gegl_buffer_cl_iterator_add (i, input, result, in_format,  GEGL_CL_BUFFER_READ);
+    GeglBufferClIterator *i = gegl_buffer_cl_iterator_new (output,   result, out_format, GEGL_CL_BUFFER_WRITE, GEGL_ABYSS_NONE);
+                  gint read = gegl_buffer_cl_iterator_add (i, input, result, in_format,  GEGL_CL_BUFFER_READ, GEGL_ABYSS_NONE);
     while (gegl_buffer_cl_iterator_next (i, &err))
       {
         if (err) return FALSE;
diff --git a/operations/common/box-blur.c b/operations/common/box-blur.c
index 8da2803..7b3cb0e 100644
--- a/operations/common/box-blur.c
+++ b/operations/common/box-blur.c
@@ -341,9 +341,9 @@ cl_process (GeglOperation       *operation,
   GeglOperationAreaFilter *op_area = GEGL_OPERATION_AREA_FILTER (operation);
   GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
 
-  GeglBufferClIterator *i = gegl_buffer_cl_iterator_new (output,   result, out_format, GEGL_CL_BUFFER_WRITE);
-                gint read = gegl_buffer_cl_iterator_add_2 (i, input, result, in_format,  GEGL_CL_BUFFER_READ, op_area->left, op_area->right, op_area->top, op_area->bottom);
-                gint aux  = gegl_buffer_cl_iterator_add_2 (i, NULL, result, in_format,  GEGL_CL_BUFFER_AUX, 0, 0, op_area->top, op_area->bottom);
+  GeglBufferClIterator *i = gegl_buffer_cl_iterator_new (output, result, out_format, GEGL_CL_BUFFER_WRITE, GEGL_ABYSS_NONE);
+                gint read = gegl_buffer_cl_iterator_add_2 (i, input, result, in_format,  GEGL_CL_BUFFER_READ, op_area->left, op_area->right, op_area->top, op_area->bottom, GEGL_ABYSS_NONE);
+                gint aux  = gegl_buffer_cl_iterator_add_2 (i, NULL, result, in_format,  GEGL_CL_BUFFER_AUX, 0, 0, op_area->top, op_area->bottom, GEGL_ABYSS_NONE);
   while (gegl_buffer_cl_iterator_next (i, &err))
     {
       if (err) return FALSE;



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