[gimp/gimp-2-10] app: migrate brush core to new iterator api



commit 4f46f92eb6aa27dfc8427122ad744166b6eba181
Author: Øyvind Kolås <pippin gimp org>
Date:   Tue Sep 11 01:34:32 2018 +0200

    app: migrate brush core to new iterator api
    
    (cherry picked from commit 46e90365784092df948df35e17b3925e3df4bd80)

 app/paint/gimpbrushcore.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/app/paint/gimpbrushcore.c b/app/paint/gimpbrushcore.c
index a2289cf419..ad1721d386 100644
--- a/app/paint/gimpbrushcore.c
+++ b/app/paint/gimpbrushcore.c
@@ -20,6 +20,7 @@
 #include <string.h>
 
 #include <gdk-pixbuf/gdk-pixbuf.h>
+#define GEGL_ITERATOR2_API
 #include <gegl.h>
 
 #include "libgimpmath/gimpmath.h"
@@ -1283,7 +1284,7 @@ gimp_brush_core_color_area_with_pixmap (GimpBrushCore            *core,
   pixmap_format = gimp_temp_buf_get_format (pixmap_mask);
 
   iter = gegl_buffer_iterator_new (area, NULL, 0, area_format,
-                                   GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE);
+                                   GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE, 1);
 
   if (mode == GIMP_BRUSH_SOFT && brush_mask)
     {
@@ -1304,11 +1305,11 @@ gimp_brush_core_color_area_with_pixmap (GimpBrushCore            *core,
       brush_mask = NULL;
     }
 
-  roi = &iter->roi[0];
+  roi = &iter->items[0].roi;
 
   while (gegl_buffer_iterator_next (iter))
     {
-      gfloat *d = iter->data[0];
+      gfloat *d = iter->items[0].data;
       gint    y;
 
       for (y = 0; y < roi->height; y++)


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