[gimp] app: migrate gimp-gegl-mask to new iterator api



commit 4b77831e036453e21f62edffa46b6c6b00b39a01
Author: Øyvind Kolås <pippin gimp org>
Date:   Tue Sep 11 00:36:29 2018 +0200

    app: migrate gimp-gegl-mask to new iterator api

 app/gegl/gimp-gegl-mask.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/app/gegl/gimp-gegl-mask.c b/app/gegl/gimp-gegl-mask.c
index f14638b264..4dad33315c 100644
--- a/app/gegl/gimp-gegl-mask.c
+++ b/app/gegl/gimp-gegl-mask.c
@@ -17,6 +17,7 @@
 
 #include "config.h"
 
+#define GEGL_ITERATOR2_API
 #include <gegl.h>
 
 #include "gimp-gegl-types.h"
@@ -48,12 +49,12 @@ gimp_gegl_mask_bounds (GeglBuffer *buffer,
   ty2 = 0;
 
   iter = gegl_buffer_iterator_new (buffer, NULL, 0, babl_format ("Y float"),
-                                   GEGL_ACCESS_READ, GEGL_ABYSS_NONE);
-  roi = &iter->roi[0];
+                                   GEGL_ACCESS_READ, GEGL_ABYSS_NONE, 1);
+  roi = &iter->items[0].roi;
 
   while (gegl_buffer_iterator_next (iter))
     {
-      gfloat *data  = iter->data[0];
+      gfloat *data  = iter->items[0].data;
       gfloat *data1 = data;
       gint    ex    = roi->x + roi->width;
       gint    ey    = roi->y + roi->height;
@@ -138,11 +139,11 @@ gimp_gegl_mask_is_empty (GeglBuffer *buffer)
   g_return_val_if_fail (GEGL_IS_BUFFER (buffer), FALSE);
 
   iter = gegl_buffer_iterator_new (buffer, NULL, 0, babl_format ("Y float"),
-                                   GEGL_ACCESS_READ, GEGL_ABYSS_NONE);
+                                   GEGL_ACCESS_READ, GEGL_ABYSS_NONE, 1);
 
   while (gegl_buffer_iterator_next (iter))
     {
-      gfloat *data = iter->data[0];
+      gfloat *data = iter->items[0].data;
       gint    i;
 
       for (i = 0; i < iter->length; i++)


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