[gegl/pippin/wip/mipmap-prerenders: 5/5] update newly added code to level aware APIs



commit 6cc4b04c29d39d772f778bcb467a2dcaaa639395
Author: Ãyvind KolÃs <pippin gimp org>
Date:   Sat Mar 24 16:17:50 2012 +0000

    update newly added code to level aware APIs

 gegl/buffer/gegl-buffer-access.c               |    2 +-
 gegl/buffer/gegl-buffer-cl-cache.c             |    8 ++++----
 gegl/buffer/gegl-buffer-cl-iterator.c          |    8 ++++----
 gegl/operation/gegl-operation-point-composer.c |   20 +++-----------------
 gegl/operation/gegl-operation-point-filter.c   |    7 ++++---
 gegl/operation/gegl-operation-point-filter.h   |    3 ++-
 gegl/operation/gegl-operation-sink.c           |    1 +
 operations/common/brightness-contrast.c        |    9 +++++----
 operations/common/invert.c                     |    9 +++++----
 operations/common/value-invert.c               |    9 +++++----
 operations/common/whitebalance.c               |    9 +++++----
 operations/external/jpg-save.c                 |    5 +++--
 operations/external/ppm-load.c                 |    4 ----
 operations/external/ppm-save.c                 |    2 --
 operations/generated/add.c                     |    3 ++-
 operations/generated/clear.c                   |    3 ++-
 operations/generated/color-burn.c              |    3 ++-
 operations/generated/color-dodge.c             |    3 ++-
 operations/generated/darken.c                  |    3 ++-
 operations/generated/difference.c              |    3 ++-
 operations/generated/divide.c                  |    3 ++-
 operations/generated/dst-atop.c                |    3 ++-
 operations/generated/dst-in.c                  |    3 ++-
 operations/generated/dst-out.c                 |    3 ++-
 operations/generated/dst-over.c                |    3 ++-
 operations/generated/dst.c                     |    3 ++-
 operations/generated/exclusion.c               |    3 ++-
 operations/generated/gamma.c                   |    3 ++-
 operations/generated/hard-light.c              |    3 ++-
 operations/generated/lighten.c                 |    3 ++-
 operations/generated/multiply.c                |    3 ++-
 operations/generated/overlay.c                 |    3 ++-
 operations/generated/plus.c                    |    3 ++-
 operations/generated/screen.c                  |    3 ++-
 operations/generated/soft-light.c              |    3 ++-
 operations/generated/src-atop.c                |    3 ++-
 operations/generated/src-in.c                  |    3 ++-
 operations/generated/src-out.c                 |    3 ++-
 operations/generated/src-over.c                |    3 ++-
 operations/generated/src.c                     |    3 ++-
 operations/generated/subtract.c                |    3 ++-
 operations/generated/xor.c                     |    3 ++-
 tests/buffer/buffer-test.c                     |   14 +++++++-------
 tests/buffer/tests/test_get_buffer_scaled.c    |    2 +-
 tests/buffer/tests/test_get_buffer_scaled2.c   |    2 +-
 tests/simple/test-change-processor-rect.c      |    2 +-
 46 files changed, 108 insertions(+), 92 deletions(-)
---
diff --git a/gegl/buffer/gegl-buffer-access.c b/gegl/buffer/gegl-buffer-access.c
index 4694e2e..a4b1fd1 100644
--- a/gegl/buffer/gegl-buffer-access.c
+++ b/gegl/buffer/gegl-buffer-access.c
@@ -1347,7 +1347,7 @@ void            gegl_buffer_set_color         (GeglBuffer          *dst,
   /* FIXME: this can be even further optimized by special casing it so
    * that fully filled tiles are shared.
    */
-  i = gegl_buffer_iterator_new (dst, dst_rect, dst->format, GEGL_BUFFER_WRITE);
+  i = gegl_buffer_iterator_new (dst, dst_rect, dst->format, GEGL_BUFFER_WRITE, 0);
   while (gegl_buffer_iterator_next (i))
     {
       int j;
diff --git a/gegl/buffer/gegl-buffer-cl-cache.c b/gegl/buffer/gegl-buffer-cl-cache.c
index bfd44fc..9cef900 100644
--- a/gegl/buffer/gegl-buffer-cl-cache.c
+++ b/gegl/buffer/gegl-buffer-cl-cache.c
@@ -102,7 +102,7 @@ gegl_buffer_cl_cache_merge (GeglBuffer          *buffer,
           if (cl_err != CL_SUCCESS) CL_ERROR;
 
           /* tile-ize */
-          gegl_buffer_set (entry->buffer, &entry->roi, entry->buffer->format, data, GEGL_AUTO_ROWSTRIDE);
+          gegl_buffer_set (entry->buffer, &entry->roi, 0, entry->buffer->format, data, GEGL_AUTO_ROWSTRIDE);
 
           cl_err = gegl_clEnqueueUnmapMemObject (gegl_cl_get_command_queue(), entry->tex, data,
                                                  0, NULL, NULL);
@@ -271,8 +271,8 @@ gegl_buffer_cl_cache_from (GeglBuffer          *buffer,
                       gegl_rectangle_contains (&cb->roi, roi))
                     {
                       gegl_buffer_get (cb->buffer,
-                                       1.0,
                                        roi,
+                                       1.0,
                                        format,
                                        dest_buf,
                                        rowstride);
@@ -310,7 +310,7 @@ gegl_buffer_cl_cache_from (GeglBuffer          *buffer,
                                                  0, NULL, NULL, &cl_err);
                   if (cl_err != CL_SUCCESS) CL_ERROR;
 
-                  gegl_buffer_set (cb->buffer, &entry->roi, format, data, GEGL_AUTO_ROWSTRIDE);
+                  gegl_buffer_set (cb->buffer, &entry->roi, 0, format, data, GEGL_AUTO_ROWSTRIDE);
 
                   cl_err = gegl_clEnqueueUnmapMemObject (gegl_cl_get_command_queue(), tex_dest, data,
                                                          0, NULL, NULL);
@@ -320,8 +320,8 @@ gegl_buffer_cl_cache_from (GeglBuffer          *buffer,
                   if (cl_err != CL_SUCCESS) CL_ERROR;
 
                   gegl_buffer_get (cb->buffer,
-                                   1.0,
                                    roi,
+                                   1.0,
                                    format,
                                    dest_buf,
                                    rowstride);
diff --git a/gegl/buffer/gegl-buffer-cl-iterator.c b/gegl/buffer/gegl-buffer-cl-iterator.c
index 864141a..c1d380d 100644
--- a/gegl/buffer/gegl-buffer-cl-iterator.c
+++ b/gegl/buffer/gegl-buffer-cl-iterator.c
@@ -252,7 +252,7 @@ gegl_buffer_cl_iterator_next (GeglBufferClIterator *iterator, gboolean *err)
                       if (cl_err != CL_SUCCESS) CL_ERROR;
 
                       /* color conversion using BABL */
-                      gegl_buffer_set (i->buffer[no], &i->roi[no][j], i->format[no], data, GEGL_AUTO_ROWSTRIDE);
+                      gegl_buffer_set (i->buffer[no], &i->roi[no][j], 0, i->format[no], data, GEGL_AUTO_ROWSTRIDE);
 
                       cl_err = gegl_clEnqueueUnmapMemObject (gegl_cl_get_command_queue(), i->tex_op[no][j], data,
                                                              0, NULL, NULL);
@@ -349,7 +349,7 @@ gegl_buffer_cl_iterator_next (GeglBufferClIterator *iterator, gboolean *err)
                     if (cl_err != CL_SUCCESS) CL_ERROR;
 
                     /* color conversion using BABL */
-                    gegl_buffer_get (i->buffer[no], 1.0, &i->roi[no][j], i->format[no], data, GEGL_AUTO_ROWSTRIDE);
+                    gegl_buffer_get (i->buffer[no], &i->roi[no][j], 1.0, i->format[no], data, GEGL_AUTO_ROWSTRIDE);
 
                     cl_err = gegl_clEnqueueUnmapMemObject (gegl_cl_get_command_queue(), i->tex_op[no][j], data,
                                                                0, NULL, NULL);
@@ -384,7 +384,7 @@ gegl_buffer_cl_iterator_next (GeglBufferClIterator *iterator, gboolean *err)
                         if (cl_err != CL_SUCCESS) CL_ERROR;
 
                         /* color conversion will be performed in the GPU later */
-                        gegl_buffer_get (i->buffer[no], 1.0, &i->roi[no][j], i->buffer[no]->format, data, GEGL_AUTO_ROWSTRIDE);
+                        gegl_buffer_get (i->buffer[no], &i->roi[no][j], 1.0, i->buffer[no]->format, data, GEGL_AUTO_ROWSTRIDE);
 
                         cl_err = gegl_clEnqueueUnmapMemObject (gegl_cl_get_command_queue(), i->tex_buf[no][j], data,
                                                                0, NULL, NULL);
@@ -420,7 +420,7 @@ gegl_buffer_cl_iterator_next (GeglBufferClIterator *iterator, gboolean *err)
                         if (cl_err != CL_SUCCESS) CL_ERROR;
 
                         /* color conversion will be performed in the GPU later */
-                        gegl_buffer_get (i->buffer[no], 1.0, &i->roi[no][j], i->buffer[no]->format, data, GEGL_AUTO_ROWSTRIDE);
+                        gegl_buffer_get (i->buffer[no], &i->roi[no][j], 1.0, i->buffer[no]->format, data, GEGL_AUTO_ROWSTRIDE);
 
                         cl_err = gegl_clEnqueueUnmapMemObject (gegl_cl_get_command_queue(), i->tex_buf[no][j], data,
                                                                0, NULL, NULL);
diff --git a/gegl/operation/gegl-operation-point-composer.c b/gegl/operation/gegl-operation-point-composer.c
index 4d89c7a..b231c20 100644
--- a/gegl/operation/gegl-operation-point-composer.c
+++ b/gegl/operation/gegl-operation-point-composer.c
@@ -227,24 +227,10 @@ gegl_operation_point_composer_process (GeglOperation       *operation,
         {
           if (gegl_operation_point_composer_cl_process (operation, input, aux, output, result))
             return TRUE;
-          /* XXX: this probably wrong when iterating on a different level */
-          gint foo = gegl_buffer_iterator_add (i, aux,  result, aux_format, GEGL_BUFFER_READ);
-
-          while (gegl_buffer_iterator_next (i))
-            {
-               point_composer_class->process (operation, i->data[read], i->data[foo], i->data[0], i->length, &(i->roi[0]), level);
-            }
-        }
-      else
-        {
-          while (gegl_buffer_iterator_next (i))
-            {
-               point_composer_class->process (operation, i->data[read], NULL, i->data[0], i->length, &(i->roi[0]), level);
-            }
         }
 
       {
-        GeglBufferIterator *i = gegl_buffer_iterator_new (output, result, out_format, GEGL_BUFFER_WRITE), level;
+        GeglBufferIterator *i = gegl_buffer_iterator_new (output, result, out_format, GEGL_BUFFER_WRITE, level);
         gint read = /*output == input ? 0 :*/ gegl_buffer_iterator_add (i, input,  result, in_format, GEGL_BUFFER_READ);
         /* using separate read and write iterators for in-place ideally a single
          * readwrite indice would be sufficient
@@ -256,14 +242,14 @@ gegl_operation_point_composer_process (GeglOperation       *operation,
 
             while (gegl_buffer_iterator_next (i))
               {
-                 point_composer_class->process (operation, i->data[read], i->data[foo], i->data[0], i->length, &(i->roi[0]));
+                 point_composer_class->process (operation, i->data[read], i->data[foo], i->data[0], i->length, &(i->roi[0]), level);
               }
           }
         else
           {
             while (gegl_buffer_iterator_next (i))
               {
-                 point_composer_class->process (operation, i->data[read], NULL, i->data[0], i->length, &(i->roi[0]));
+                 point_composer_class->process (operation, i->data[read], NULL, i->data[0], i->length, &(i->roi[0]), level);
               }
           }
       }
diff --git a/gegl/operation/gegl-operation-point-filter.c b/gegl/operation/gegl-operation-point-filter.c
index 6a4f11c..c72454b 100644
--- a/gegl/operation/gegl-operation-point-filter.c
+++ b/gegl/operation/gegl-operation-point-filter.c
@@ -78,7 +78,8 @@ static gboolean
 gegl_operation_point_filter_cl_process (GeglOperation       *operation,
                                         GeglBuffer          *input,
                                         GeglBuffer          *output,
-                                        const GeglRectangle *result)
+                                        const GeglRectangle *result,
+                                        gint                 level)
 {
   const Babl *in_format  = gegl_operation_get_format (operation, "input");
   const Babl *out_format = gegl_operation_get_format (operation, "output");
@@ -115,7 +116,7 @@ gegl_operation_point_filter_cl_process (GeglOperation       *operation,
         for (j=0; j < i->n; j++)
           {
             cl_err = point_filter_class->cl_process(operation, i->tex[read][j], i->tex[0][j],
-                                                    i->size[0][j], &i->roi[0][j]);
+                                                    i->size[0][j], &i->roi[0][j], level);
             if (cl_err != CL_SUCCESS)
               {
                 GEGL_NOTE (GEGL_DEBUG_OPENCL, "Error in %s [GeglOperationPointFilter] Kernel",
@@ -145,7 +146,7 @@ gegl_operation_point_filter_process (GeglOperation       *operation,
     {
       if (gegl_cl_is_accelerated () && point_filter_class->cl_process)
         {
-          if (gegl_operation_point_filter_cl_process (operation, input, output, result))
+          if (gegl_operation_point_filter_cl_process (operation, input, output, result, level))
             return TRUE;
         }
 
diff --git a/gegl/operation/gegl-operation-point-filter.h b/gegl/operation/gegl-operation-point-filter.h
index 08e3671..938da7b 100644
--- a/gegl/operation/gegl-operation-point-filter.h
+++ b/gegl/operation/gegl-operation-point-filter.h
@@ -58,11 +58,12 @@ struct _GeglOperationPointFilterClass
                                                         in in buffer, see the
                                                         checkerboard op for
                                                         semantics */
+                        gint                 level);
   cl_int   (* cl_process) (GeglOperation       *self,
                            cl_mem               in_tex,
                            cl_mem               out_tex,
                            size_t               global_worksize,
-                           const GeglRectangle *roi);
+                           const GeglRectangle *roi,
                            gint                 level);
   gpointer                 pad[4];
 };
diff --git a/gegl/operation/gegl-operation-sink.c b/gegl/operation/gegl-operation-sink.c
index 7ec06ca..27eff65 100644
--- a/gegl/operation/gegl-operation-sink.c
+++ b/gegl/operation/gegl-operation-sink.c
@@ -27,6 +27,7 @@
 #include "gegl-operation-sink.h"
 #include "graph/gegl-node.h"
 #include "graph/gegl-pad.h"
+#include "buffer/gegl-buffer-cl-cache.h"
 
 
 enum
diff --git a/operations/common/brightness-contrast.c b/operations/common/brightness-contrast.c
index ffe4d48..c3ca018 100644
--- a/operations/common/brightness-contrast.c
+++ b/operations/common/brightness-contrast.c
@@ -126,10 +126,11 @@ static gegl_cl_run_data *cl_data = NULL;
 /* OpenCL processing function */
 static cl_int
 cl_process (GeglOperation       *op,
-            cl_mem              in_tex,
-            cl_mem              out_tex,
-            size_t              global_worksize,
-            const GeglRectangle *roi)
+            cl_mem               in_tex,
+            cl_mem               out_tex,
+            size_t               global_worksize,
+            const GeglRectangle *roi,
+            int                  level)
 {
   /* Retrieve a pointer to GeglChantO structure which contains all the
    * chanted properties
diff --git a/operations/common/invert.c b/operations/common/invert.c
index c4c6680..f300b85 100644
--- a/operations/common/invert.c
+++ b/operations/common/invert.c
@@ -80,10 +80,11 @@ static gegl_cl_run_data *cl_data = NULL;
 /* OpenCL processing function */
 static cl_int
 cl_process (GeglOperation       *op,
-            cl_mem              in_tex,
-            cl_mem              out_tex,
-            size_t              global_worksize,
-            const GeglRectangle *roi)
+            cl_mem               in_tex,
+            cl_mem               out_tex,
+            size_t               global_worksize,
+            const GeglRectangle *roi,
+            int                  level)
 {
   cl_int cl_err = 0;
 
diff --git a/operations/common/value-invert.c b/operations/common/value-invert.c
index 5d29664..2cfcb63 100644
--- a/operations/common/value-invert.c
+++ b/operations/common/value-invert.c
@@ -165,10 +165,11 @@ static gegl_cl_run_data *cl_data = NULL;
 /* OpenCL processing function */
 static cl_int
 cl_process (GeglOperation       *op,
-            cl_mem              in_tex,
-            cl_mem              out_tex,
-            size_t              global_worksize,
-            const GeglRectangle *roi)
+            cl_mem               in_tex,
+            cl_mem               out_tex,
+            size_t               global_worksize,
+            const GeglRectangle *roi,
+            int                  level)
 {
 
   cl_int cl_err = 0;
diff --git a/operations/common/whitebalance.c b/operations/common/whitebalance.c
index 2eb31e2..a6af68d 100644
--- a/operations/common/whitebalance.c
+++ b/operations/common/whitebalance.c
@@ -112,10 +112,11 @@ static gegl_cl_run_data *cl_data = NULL;
 /* OpenCL processing function */
 static cl_int
 cl_process (GeglOperation       *op,
-            cl_mem              in_tex,
-            cl_mem              out_tex,
-            size_t              global_worksize,
-            const GeglRectangle *roi)
+            cl_mem               in_tex,
+            cl_mem               out_tex,
+            size_t               global_worksize,
+            const GeglRectangle *roi,
+            int                  level)
 {
   /* Retrieve a pointer to GeglChantO structure which contains all the
    * chanted properties
diff --git a/operations/external/jpg-save.c b/operations/external/jpg-save.c
index ac0daa6..70bf9ac 100644
--- a/operations/external/jpg-save.c
+++ b/operations/external/jpg-save.c
@@ -139,7 +139,7 @@ gegl_buffer_export_jpg (GeglBuffer  *gegl_buffer,
     rect.width = width;
     rect.height = 1;
 
-    gegl_buffer_get (gegl_buffer, 1.0, &rect, format,
+    gegl_buffer_get (gegl_buffer, &rect, 1.0, format,
                      row_pointer[0], GEGL_AUTO_ROWSTRIDE);
 
     jpeg_write_scanlines (&cinfo, row_pointer, 1);
@@ -159,7 +159,8 @@ gegl_buffer_export_jpg (GeglBuffer  *gegl_buffer,
 static gboolean
 gegl_jpg_save_process (GeglOperation       *operation,
                        GeglBuffer          *input,
-                       const GeglRectangle *result)
+                       const GeglRectangle *result,
+                       int                  level)
 {
   GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
 
diff --git a/operations/external/ppm-load.c b/operations/external/ppm-load.c
index d793dd0..32c13e1 100644
--- a/operations/external/ppm-load.c
+++ b/operations/external/ppm-load.c
@@ -110,8 +110,6 @@ ppm_load_read_header(FILE       *fp,
     }
 
     return TRUE;
-    if (retval)
-      return TRUE;
 }
 
 static void
@@ -167,8 +165,6 @@ ppm_load_read_image(FILE       *fp,
             g_warning ("%s: Programmer stupidity error", G_STRLOC);
           }
       }
-    if (retval)
-      return;
 }
 
 static GeglRectangle
diff --git a/operations/external/ppm-save.c b/operations/external/ppm-save.c
index 5ac815f..dc947f9 100644
--- a/operations/external/ppm-save.c
+++ b/operations/external/ppm-save.c
@@ -107,8 +107,6 @@ ppm_save_write(FILE    *fp,
           g_warning ("%s: Programmer stupidity error", G_STRLOC);
         }
     }
-  if (retval) /* make gcc shut up*/
-    return;
 }
 
 static gboolean
diff --git a/operations/generated/add.c b/operations/generated/add.c
index 5ed9b9c..2d10d72 100644
--- a/operations/generated/add.c
+++ b/operations/generated/add.c
@@ -56,7 +56,8 @@ process (GeglOperation        *op,
           void                *aux_buf,
           void                *out_buf,
           glong                n_pixels,
-          const GeglRectangle *roi)
+          const GeglRectangle *roi,
+          gint                 level)
 {
   gfloat * GEGL_ALIGNED in = in_buf;
   gfloat * GEGL_ALIGNED out = out_buf;
diff --git a/operations/generated/clear.c b/operations/generated/clear.c
index 40c8818..2e1c7a3 100644
--- a/operations/generated/clear.c
+++ b/operations/generated/clear.c
@@ -58,7 +58,8 @@ process (GeglOperation        *op,
           void                *aux_buf,
           void                *out_buf,
           glong                n_pixels,
-          const GeglRectangle *roi)
+          const GeglRectangle *roi,
+          gint                 level)
 {
   gint i;
   gfloat * GEGL_ALIGNED in = in_buf;
diff --git a/operations/generated/color-burn.c b/operations/generated/color-burn.c
index 609a13f..c167a56 100644
--- a/operations/generated/color-burn.c
+++ b/operations/generated/color-burn.c
@@ -58,7 +58,8 @@ process (GeglOperation       *op,
          void                *aux_buf,
          void                *out_buf,
          glong                n_pixels,
-         const GeglRectangle *roi)
+         const GeglRectangle *roi,
+         gint                 level)
 {
   gfloat * GEGL_ALIGNED in = in_buf;
   gfloat * GEGL_ALIGNED aux = aux_buf;
diff --git a/operations/generated/color-dodge.c b/operations/generated/color-dodge.c
index 312d7b9..17ad2a4 100644
--- a/operations/generated/color-dodge.c
+++ b/operations/generated/color-dodge.c
@@ -58,7 +58,8 @@ process (GeglOperation       *op,
          void                *aux_buf,
          void                *out_buf,
          glong                n_pixels,
-         const GeglRectangle *roi)
+         const GeglRectangle *roi,
+         gint                 level)
 {
   gfloat * GEGL_ALIGNED in = in_buf;
   gfloat * GEGL_ALIGNED aux = aux_buf;
diff --git a/operations/generated/darken.c b/operations/generated/darken.c
index 4ea6c1c..61c8fd6 100644
--- a/operations/generated/darken.c
+++ b/operations/generated/darken.c
@@ -58,7 +58,8 @@ process (GeglOperation       *op,
          void                *aux_buf,
          void                *out_buf,
          glong                n_pixels,
-         const GeglRectangle *roi)
+         const GeglRectangle *roi,
+         gint                 level)
 {
   gfloat * GEGL_ALIGNED in = in_buf;
   gfloat * GEGL_ALIGNED aux = aux_buf;
diff --git a/operations/generated/difference.c b/operations/generated/difference.c
index 60ed1e6..b348a5c 100644
--- a/operations/generated/difference.c
+++ b/operations/generated/difference.c
@@ -58,7 +58,8 @@ process (GeglOperation       *op,
          void                *aux_buf,
          void                *out_buf,
          glong                n_pixels,
-         const GeglRectangle *roi)
+         const GeglRectangle *roi,
+         gint                 level)
 {
   gfloat * GEGL_ALIGNED in = in_buf;
   gfloat * GEGL_ALIGNED aux = aux_buf;
diff --git a/operations/generated/divide.c b/operations/generated/divide.c
index 938e0c1..4edafb4 100644
--- a/operations/generated/divide.c
+++ b/operations/generated/divide.c
@@ -56,7 +56,8 @@ process (GeglOperation        *op,
           void                *aux_buf,
           void                *out_buf,
           glong                n_pixels,
-          const GeglRectangle *roi)
+          const GeglRectangle *roi,
+          gint                 level)
 {
   gfloat * GEGL_ALIGNED in = in_buf;
   gfloat * GEGL_ALIGNED out = out_buf;
diff --git a/operations/generated/dst-atop.c b/operations/generated/dst-atop.c
index 021b411..48f667e 100644
--- a/operations/generated/dst-atop.c
+++ b/operations/generated/dst-atop.c
@@ -58,7 +58,8 @@ process (GeglOperation        *op,
           void                *aux_buf,
           void                *out_buf,
           glong                n_pixels,
-          const GeglRectangle *roi)
+          const GeglRectangle *roi,
+          gint                 level)
 {
   gint i;
   gfloat * GEGL_ALIGNED in = in_buf;
diff --git a/operations/generated/dst-in.c b/operations/generated/dst-in.c
index a41c93a..001de96 100644
--- a/operations/generated/dst-in.c
+++ b/operations/generated/dst-in.c
@@ -58,7 +58,8 @@ process (GeglOperation        *op,
           void                *aux_buf,
           void                *out_buf,
           glong                n_pixels,
-          const GeglRectangle *roi)
+          const GeglRectangle *roi,
+          gint                 level)
 {
   gint i;
   gfloat * GEGL_ALIGNED in = in_buf;
diff --git a/operations/generated/dst-out.c b/operations/generated/dst-out.c
index 4634193..7e4af5d 100644
--- a/operations/generated/dst-out.c
+++ b/operations/generated/dst-out.c
@@ -58,7 +58,8 @@ process (GeglOperation        *op,
           void                *aux_buf,
           void                *out_buf,
           glong                n_pixels,
-          const GeglRectangle *roi)
+          const GeglRectangle *roi,
+          gint                 level)
 {
   gint i;
   gfloat * GEGL_ALIGNED in = in_buf;
diff --git a/operations/generated/dst-over.c b/operations/generated/dst-over.c
index e6628a4..9df2eb5 100644
--- a/operations/generated/dst-over.c
+++ b/operations/generated/dst-over.c
@@ -58,7 +58,8 @@ process (GeglOperation        *op,
           void                *aux_buf,
           void                *out_buf,
           glong                n_pixels,
-          const GeglRectangle *roi)
+          const GeglRectangle *roi,
+          gint                 level)
 {
   gint i;
   gfloat * GEGL_ALIGNED in = in_buf;
diff --git a/operations/generated/dst.c b/operations/generated/dst.c
index 14a7183..a4a51b9 100644
--- a/operations/generated/dst.c
+++ b/operations/generated/dst.c
@@ -58,7 +58,8 @@ process (GeglOperation        *op,
           void                *aux_buf,
           void                *out_buf,
           glong                n_pixels,
-          const GeglRectangle *roi)
+          const GeglRectangle *roi,
+          gint                 level)
 {
   gint i;
   gfloat * GEGL_ALIGNED in = in_buf;
diff --git a/operations/generated/exclusion.c b/operations/generated/exclusion.c
index e31a753..f527183 100644
--- a/operations/generated/exclusion.c
+++ b/operations/generated/exclusion.c
@@ -58,7 +58,8 @@ process (GeglOperation       *op,
          void                *aux_buf,
          void                *out_buf,
          glong                n_pixels,
-         const GeglRectangle *roi)
+         const GeglRectangle *roi,
+         gint                 level)
 {
   gfloat * GEGL_ALIGNED in = in_buf;
   gfloat * GEGL_ALIGNED aux = aux_buf;
diff --git a/operations/generated/gamma.c b/operations/generated/gamma.c
index e9022b2..cfaafcf 100644
--- a/operations/generated/gamma.c
+++ b/operations/generated/gamma.c
@@ -56,7 +56,8 @@ process (GeglOperation        *op,
           void                *aux_buf,
           void                *out_buf,
           glong                n_pixels,
-          const GeglRectangle *roi)
+          const GeglRectangle *roi,
+          gint                 level)
 {
   gfloat * GEGL_ALIGNED in = in_buf;
   gfloat * GEGL_ALIGNED out = out_buf;
diff --git a/operations/generated/hard-light.c b/operations/generated/hard-light.c
index 3572f0e..dd9b5f7 100644
--- a/operations/generated/hard-light.c
+++ b/operations/generated/hard-light.c
@@ -58,7 +58,8 @@ process (GeglOperation       *op,
          void                *aux_buf,
          void                *out_buf,
          glong                n_pixels,
-         const GeglRectangle *roi)
+         const GeglRectangle *roi,
+         gint                 level)
 {
   gfloat * GEGL_ALIGNED in = in_buf;
   gfloat * GEGL_ALIGNED aux = aux_buf;
diff --git a/operations/generated/lighten.c b/operations/generated/lighten.c
index 5acad24..bff48b3 100644
--- a/operations/generated/lighten.c
+++ b/operations/generated/lighten.c
@@ -58,7 +58,8 @@ process (GeglOperation       *op,
          void                *aux_buf,
          void                *out_buf,
          glong                n_pixels,
-         const GeglRectangle *roi)
+         const GeglRectangle *roi,
+         gint                 level)
 {
   gfloat * GEGL_ALIGNED in = in_buf;
   gfloat * GEGL_ALIGNED aux = aux_buf;
diff --git a/operations/generated/multiply.c b/operations/generated/multiply.c
index bfc994c..8b5b239 100644
--- a/operations/generated/multiply.c
+++ b/operations/generated/multiply.c
@@ -56,7 +56,8 @@ process (GeglOperation        *op,
           void                *aux_buf,
           void                *out_buf,
           glong                n_pixels,
-          const GeglRectangle *roi)
+          const GeglRectangle *roi,
+          gint                 level)
 {
   gfloat * GEGL_ALIGNED in = in_buf;
   gfloat * GEGL_ALIGNED out = out_buf;
diff --git a/operations/generated/overlay.c b/operations/generated/overlay.c
index 32fcbb8..00bf526 100644
--- a/operations/generated/overlay.c
+++ b/operations/generated/overlay.c
@@ -58,7 +58,8 @@ process (GeglOperation       *op,
          void                *aux_buf,
          void                *out_buf,
          glong                n_pixels,
-         const GeglRectangle *roi)
+         const GeglRectangle *roi,
+         gint                 level)
 {
   gfloat * GEGL_ALIGNED in = in_buf;
   gfloat * GEGL_ALIGNED aux = aux_buf;
diff --git a/operations/generated/plus.c b/operations/generated/plus.c
index 614b134..6c7ca18 100644
--- a/operations/generated/plus.c
+++ b/operations/generated/plus.c
@@ -58,7 +58,8 @@ process (GeglOperation       *op,
          void                *aux_buf,
          void                *out_buf,
          glong                n_pixels,
-         const GeglRectangle *roi)
+         const GeglRectangle *roi,
+         gint                 level)
 {
   gfloat * GEGL_ALIGNED in = in_buf;
   gfloat * GEGL_ALIGNED aux = aux_buf;
diff --git a/operations/generated/screen.c b/operations/generated/screen.c
index 06d60e8..aecf914 100644
--- a/operations/generated/screen.c
+++ b/operations/generated/screen.c
@@ -58,7 +58,8 @@ process (GeglOperation       *op,
          void                *aux_buf,
          void                *out_buf,
          glong                n_pixels,
-         const GeglRectangle *roi)
+         const GeglRectangle *roi,
+         gint                 level)
 {
   gfloat * GEGL_ALIGNED in = in_buf;
   gfloat * GEGL_ALIGNED aux = aux_buf;
diff --git a/operations/generated/soft-light.c b/operations/generated/soft-light.c
index cbfdf4f..4e087b7 100644
--- a/operations/generated/soft-light.c
+++ b/operations/generated/soft-light.c
@@ -59,7 +59,8 @@ process (GeglOperation       *op,
          void                *aux_buf,
          void                *out_buf,
          glong                n_pixels,
-         const GeglRectangle *roi)
+         const GeglRectangle *roi,
+         gint                 level)
 {
   gfloat * GEGL_ALIGNED in = in_buf;
   gfloat * GEGL_ALIGNED aux = aux_buf;
diff --git a/operations/generated/src-atop.c b/operations/generated/src-atop.c
index 71f1144..939eadd 100644
--- a/operations/generated/src-atop.c
+++ b/operations/generated/src-atop.c
@@ -58,7 +58,8 @@ process (GeglOperation        *op,
           void                *aux_buf,
           void                *out_buf,
           glong                n_pixels,
-          const GeglRectangle *roi)
+          const GeglRectangle *roi,
+          gint                 level)
 {
   gint i;
   gfloat * GEGL_ALIGNED in = in_buf;
diff --git a/operations/generated/src-in.c b/operations/generated/src-in.c
index 9e5a8f3..f116914 100644
--- a/operations/generated/src-in.c
+++ b/operations/generated/src-in.c
@@ -58,7 +58,8 @@ process (GeglOperation        *op,
           void                *aux_buf,
           void                *out_buf,
           glong                n_pixels,
-          const GeglRectangle *roi)
+          const GeglRectangle *roi,
+          gint                 level)
 {
   gint i;
   gfloat * GEGL_ALIGNED in = in_buf;
diff --git a/operations/generated/src-out.c b/operations/generated/src-out.c
index 32985ef..44a2df5 100644
--- a/operations/generated/src-out.c
+++ b/operations/generated/src-out.c
@@ -58,7 +58,8 @@ process (GeglOperation        *op,
           void                *aux_buf,
           void                *out_buf,
           glong                n_pixels,
-          const GeglRectangle *roi)
+          const GeglRectangle *roi,
+          gint                 level)
 {
   gint i;
   gfloat * GEGL_ALIGNED in = in_buf;
diff --git a/operations/generated/src-over.c b/operations/generated/src-over.c
index dd6abc0..39d06af 100644
--- a/operations/generated/src-over.c
+++ b/operations/generated/src-over.c
@@ -58,7 +58,8 @@ process (GeglOperation        *op,
           void                *aux_buf,
           void                *out_buf,
           glong                n_pixels,
-          const GeglRectangle *roi)
+          const GeglRectangle *roi,
+          gint                 level)
 {
   gint i;
   gfloat * GEGL_ALIGNED in = in_buf;
diff --git a/operations/generated/src.c b/operations/generated/src.c
index 8eef194..e53e7c1 100644
--- a/operations/generated/src.c
+++ b/operations/generated/src.c
@@ -58,7 +58,8 @@ process (GeglOperation        *op,
           void                *aux_buf,
           void                *out_buf,
           glong                n_pixels,
-          const GeglRectangle *roi)
+          const GeglRectangle *roi,
+          gint                 level)
 {
   gint i;
   gfloat * GEGL_ALIGNED in = in_buf;
diff --git a/operations/generated/subtract.c b/operations/generated/subtract.c
index 34f62d2..43317dc 100644
--- a/operations/generated/subtract.c
+++ b/operations/generated/subtract.c
@@ -56,7 +56,8 @@ process (GeglOperation        *op,
           void                *aux_buf,
           void                *out_buf,
           glong                n_pixels,
-          const GeglRectangle *roi)
+          const GeglRectangle *roi,
+          gint                 level)
 {
   gfloat * GEGL_ALIGNED in = in_buf;
   gfloat * GEGL_ALIGNED out = out_buf;
diff --git a/operations/generated/xor.c b/operations/generated/xor.c
index b7080b4..98da841 100644
--- a/operations/generated/xor.c
+++ b/operations/generated/xor.c
@@ -58,7 +58,8 @@ process (GeglOperation        *op,
           void                *aux_buf,
           void                *out_buf,
           glong                n_pixels,
-          const GeglRectangle *roi)
+          const GeglRectangle *roi,
+          gint                 level)
 {
   gint i;
   gfloat * GEGL_ALIGNED in = in_buf;
diff --git a/tests/buffer/buffer-test.c b/tests/buffer/buffer-test.c
index cd32005..9a01846 100644
--- a/tests/buffer/buffer-test.c
+++ b/tests/buffer/buffer-test.c
@@ -149,7 +149,7 @@ print_buffer_internal (GString    *gstring,
                         "height", &height,
                         NULL);
   buf = g_malloc (width*height*sizeof(gfloat));
-  gegl_buffer_get (buffer, 1.0, NULL, babl_format ("Y float"), buf, 0);
+  gegl_buffer_get (buffer, NULL, 1.0, babl_format ("Y float"), buf, 0);
   print_linear_buffer_internal_float (gstring, width, height, buf);
   g_free (buf);
 }
@@ -168,7 +168,7 @@ fill (GeglBuffer *buffer,
                         "height", &height,
                         NULL);
   buf = g_malloc (width*height*sizeof(gfloat));
-  gegl_buffer_get (buffer, 1.0, NULL, babl_format ("Y float"), buf, 0);
+  gegl_buffer_get (buffer, NULL, 1.0, babl_format ("Y float"), buf, 0);
 
   i=0;
   for (y=0;y<height;y++)
@@ -178,7 +178,7 @@ fill (GeglBuffer *buffer,
           buf[i++]=value;
         }
     }
-  gegl_buffer_set (buffer, NULL, babl_format ("Y float"), buf, GEGL_AUTO_ROWSTRIDE, 0);
+  gegl_buffer_set (buffer, NULL, 0, babl_format ("Y float"), buf, GEGL_AUTO_ROWSTRIDE);
   g_free (buf);
 }
 
@@ -197,7 +197,7 @@ static void checkerboard          (GeglBuffer *buffer,
                         "height", &height,
                         NULL);
   buf = g_malloc (width*height*sizeof(gfloat));
-  gegl_buffer_get (buffer, 1.0, NULL, babl_format ("Y float"), buf, 0);
+  gegl_buffer_get (buffer, NULL, 1.0, babl_format ("Y float"), buf, 0);
 
   i=0;
   for (y=0;y<height;y++)
@@ -223,7 +223,7 @@ static void checkerboard          (GeglBuffer *buffer,
         }
     }
 
-  gegl_buffer_set (buffer, NULL, babl_format ("Y float"), buf, GEGL_AUTO_ROWSTRIDE, 0);
+  gegl_buffer_set (buffer, NULL, 0, babl_format ("Y float"), buf, GEGL_AUTO_ROWSTRIDE);
 
   g_free (buf);
 }
@@ -240,7 +240,7 @@ static void vgrad (GeglBuffer *buffer)
                         "height", &height,
                         NULL);
   buf = g_malloc (width*height*sizeof(gfloat));
-  gegl_buffer_get (buffer, 1.0, NULL, babl_format ("Y float"), buf, 0);
+  gegl_buffer_get (buffer, NULL, 1.0, babl_format ("Y float"), buf, 0);
 
   i=0;
   for (y=0;y<height;y++)
@@ -250,7 +250,7 @@ static void vgrad (GeglBuffer *buffer)
           buf[i++]= (1.0*y)/height;
         }
     }
-  gegl_buffer_set (buffer, NULL, babl_format ("Y float"), buf, GEGL_AUTO_ROWSTRIDE, 0);
+  gegl_buffer_set (buffer, NULL, 0, babl_format ("Y float"), buf, GEGL_AUTO_ROWSTRIDE);
   g_free (buf);
 }
 
diff --git a/tests/buffer/tests/test_get_buffer_scaled.c b/tests/buffer/tests/test_get_buffer_scaled.c
index da16119..0b8da49 100644
--- a/tests/buffer/tests/test_get_buffer_scaled.c
+++ b/tests/buffer/tests/test_get_buffer_scaled.c
@@ -18,7 +18,7 @@ TEST ()
         {
           getrect.x=i;
           /*getrect.y=i;*/
-          gegl_buffer_get (buffer, 1.2, &getrect, babl_format ("Y u8"), buf, 0);
+          gegl_buffer_get (buffer, &getrect, 1.2, babl_format ("Y u8"), buf, 0);
           print_linear_buffer_u8 (getrect.width, getrect.height, buf);
         }
     }
diff --git a/tests/buffer/tests/test_get_buffer_scaled2.c b/tests/buffer/tests/test_get_buffer_scaled2.c
index b737ab7..ab4da47 100644
--- a/tests/buffer/tests/test_get_buffer_scaled2.c
+++ b/tests/buffer/tests/test_get_buffer_scaled2.c
@@ -11,7 +11,7 @@ TEST ()
   checkerboard (buffer, 2, 0.0, 1.0);
   buf = g_malloc (getrect.width*getrect.height*sizeof(gfloat));
 
-  gegl_buffer_get (buffer, 0.66, &getrect, babl_format ("Y u8"), buf, 0);
+  gegl_buffer_get (buffer, &getrect, 0.66, babl_format ("Y u8"), buf, 0);
 
 
   print_linear_buffer_u8 (getrect.width, getrect.height, buf);
diff --git a/tests/simple/test-change-processor-rect.c b/tests/simple/test-change-processor-rect.c
index 3769362..b1268a9 100644
--- a/tests/simple/test-change-processor-rect.c
+++ b/tests/simple/test-change-processor-rect.c
@@ -47,8 +47,8 @@ test_change_processor_rect_do_test (GeglProcessor       *processor,
   while (gegl_processor_work (processor, NULL));
 
   gegl_buffer_get (buffer,
-                   1.0,
                    rect,
+                   1.0,
                    babl_format ("RGBA float"),
                    result_buffer,
                    GEGL_AUTO_ROWSTRIDE);



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