[gegl] stretch-contrast-hsv: use new iterator api



commit 76eddedd1bcf5e9d4582539f76d5ef1bd03abbfb
Author: Øyvind Kolås <pippin gimp org>
Date:   Mon Sep 10 22:36:23 2018 +0200

    stretch-contrast-hsv: use new iterator api

 operations/common/stretch-contrast-hsv.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/operations/common/stretch-contrast-hsv.c b/operations/common/stretch-contrast-hsv.c
index 1cc8d8b2e..3b4676a2b 100644
--- a/operations/common/stretch-contrast-hsv.c
+++ b/operations/common/stretch-contrast-hsv.c
@@ -20,6 +20,7 @@
  *
  */
 
+#define GEGL_ITERATOR2_API
 #include "config.h"
 #include <glib/gi18n-lib.h>
 
@@ -58,11 +59,11 @@ buffer_get_auto_stretch_data (GeglOperation       *operation,
   gegl_operation_progress (operation, 0.0, "");
 
   gi = gegl_buffer_iterator_new (buffer, result, 0, babl_format_with_space ("HSVA float", space),
-                                 GEGL_ACCESS_READ, GEGL_ABYSS_NONE);
+                                 GEGL_ACCESS_READ, GEGL_ABYSS_NONE, 1);
 
   while (gegl_buffer_iterator_next (gi))
     {
-      gfloat *buf = gi->data[0];
+      gfloat *buf = gi->items[0].data;
       gint    i;
 
       for (i = 0; i < gi->length; i++)
@@ -165,15 +166,15 @@ process (GeglOperation       *operation,
   gegl_operation_progress (operation, 0.5, "");
 
   gi = gegl_buffer_iterator_new (input, result, 0, babl_format_with_space ("HSVA float", space),
-                                 GEGL_ACCESS_READ, GEGL_ABYSS_NONE);
+                                 GEGL_ACCESS_READ, GEGL_ABYSS_NONE, 2);
 
   gegl_buffer_iterator_add (gi, output, result, 0, babl_format_with_space ("HSVA float", space),
                             GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE);
 
   while (gegl_buffer_iterator_next (gi))
     {
-      gfloat *in  = gi->data[0];
-      gfloat *out = gi->data[1];
+      gfloat *in  = gi->items[0].data;
+      gfloat *out = gi->items[1].data;
       gint    i;
 
       for (i = 0; i < gi->length; i++)


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