[gimp/gimp-2-10] plug-ins: migrate gradient-map to new iterator api
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gimp/gimp-2-10] plug-ins: migrate gradient-map to new iterator api
- Date: Tue, 18 Sep 2018 10:39:06 +0000 (UTC)
commit 78b81a200a31134fe0ba30b66288557feb54fd9c
Author: Øyvind Kolås <pippin gimp org>
Date:   Tue Sep 11 02:02:13 2018 +0200
    plug-ins: migrate gradient-map to new iterator api
    
    (cherry picked from commit ee48ec6877c2ca1997372e8734d53a37d10ef703)
 plug-ins/common/gradient-map.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/plug-ins/common/gradient-map.c b/plug-ins/common/gradient-map.c
index c5ad659d5b..a3afdc7250 100644
--- a/plug-ins/common/gradient-map.c
+++ b/plug-ins/common/gradient-map.c
@@ -18,6 +18,7 @@
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
  */
 
+#define GEGL_ITERATOR2_API
 #include "config.h"
 #include <string.h>
 
@@ -265,7 +266,7 @@ map (GeglBuffer   *buffer,
     }
 
   gi = gegl_buffer_iterator_new (shadow_buffer, NULL, 0, format_shadow,
-                                 GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE);
+                                 GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE, 2);
 
   index_iter = gegl_buffer_iterator_add (gi, buffer, NULL,
                                          0, format_buffer,
@@ -277,8 +278,8 @@ map (GeglBuffer   *buffer,
       gfloat *data;
       gfloat *data2;
 
-      data  = (gfloat*) gi->data[0];
-      data2 = (gfloat*) gi->data[index_iter];
+      data  = (gfloat*) gi->items[0].data;
+      data2 = (gfloat*) gi->items[index_iter].data;
 
       if (interpolate)
         {
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]