[gimp/gimp-2-10] app: pickable-contiguous-region migrated to new buffer iterator



commit 969a028dcc4aed06addbf729fd675700cccc8cc0
Author: Øyvind Kolås <pippin gimp org>
Date:   Tue Sep 11 00:19:21 2018 +0200

    app: pickable-contiguous-region migrated to new buffer iterator
    
    (cherry picked from commit c56f5433544f563a52ccee79650a39039c104a82)

 app/core/gimppickable-contiguous-region.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/app/core/gimppickable-contiguous-region.c b/app/core/gimppickable-contiguous-region.c
index 52754ce67c..b7033da546 100644
--- a/app/core/gimppickable-contiguous-region.c
+++ b/app/core/gimppickable-contiguous-region.c
@@ -20,6 +20,7 @@
 #include <stdlib.h>
 
 #include <cairo.h>
+#define GEGL_ITERATOR2_API
 #include <gegl.h>
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
@@ -218,7 +219,7 @@ gimp_pickable_contiguous_region_by_color (GimpPickable        *pickable,
 
   iter = gegl_buffer_iterator_new (src_buffer,
                                    NULL, 0, format,
-                                   GEGL_ACCESS_READ, GEGL_ABYSS_NONE);
+                                   GEGL_ACCESS_READ, GEGL_ABYSS_NONE, 2);
 
   gegl_buffer_iterator_add (iter, mask_buffer,
                             NULL, 0, babl_format ("Y float"),
@@ -226,8 +227,8 @@ gimp_pickable_contiguous_region_by_color (GimpPickable        *pickable,
 
   while (gegl_buffer_iterator_next (iter))
     {
-      const gfloat *src   = iter->data[0];
-      gfloat       *dest  = iter->data[1];
+      const gfloat *src   = iter->items[0].data;
+      gfloat       *dest  = iter->items[1].data;
       gint          count = iter->length;
 
       while (count--)


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