[gimp] modules: migrate display filters to new iterator api
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] modules: migrate display filters to new iterator api
- Date: Wed, 12 Sep 2018 11:55:20 +0000 (UTC)
commit 41e8035635292ce09007bf8f5fdaf9cc960c60e8
Author: Øyvind Kolås <pippin gimp org>
Date: Tue Sep 11 01:37:01 2018 +0200
modules: migrate display filters to new iterator api
modules/display-filter-clip-warning.c | 13 +++++++------
modules/display-filter-color-blind.c | 5 +++--
modules/display-filter-gamma.c | 5 +++--
modules/display-filter-high-contrast.c | 5 +++--
4 files changed, 16 insertions(+), 12 deletions(-)
---
diff --git a/modules/display-filter-clip-warning.c b/modules/display-filter-clip-warning.c
index 0e140df15c..71e92736c2 100644
--- a/modules/display-filter-clip-warning.c
+++ b/modules/display-filter-clip-warning.c
@@ -20,6 +20,7 @@
#include <string.h>
+#define GEGL_ITERATOR2_API
#include <gegl.h>
#include <gtk/gtk.h>
@@ -353,14 +354,14 @@ cdisplay_clip_warning_convert_buffer (GimpColorDisplay *display,
iter = gegl_buffer_iterator_new (buffer, area, 0,
babl_format ("R'G'B'A float"),
- GEGL_ACCESS_READWRITE, GEGL_ABYSS_NONE);
+ GEGL_ACCESS_READWRITE, GEGL_ABYSS_NONE, 1);
while (gegl_buffer_iterator_next (iter))
{
- gfloat *data = iter->data[0];
+ gfloat *data = iter->items[0].data;
gint count = iter->length;
- gint x = iter->roi[0].x;
- gint y = iter->roi[0].y;
+ gint x = iter->items[0].roi.x;
+ gint y = iter->items[0].roi.y;
while (count--)
{
@@ -406,9 +407,9 @@ cdisplay_clip_warning_convert_buffer (GimpColorDisplay *display,
data += 4;
- if (++x == iter->roi[0].x + iter->roi[0].width)
+ if (++x == iter->items[0].roi.x + iter->items[0].roi.width)
{
- x = iter->roi[0].x;
+ x = iter->items[0].roi.x;
y++;
}
}
diff --git a/modules/display-filter-color-blind.c b/modules/display-filter-color-blind.c
index aee9df704c..604f3f0d10 100644
--- a/modules/display-filter-color-blind.c
+++ b/modules/display-filter-color-blind.c
@@ -29,6 +29,7 @@
#include <string.h>
+#define GEGL_ITERATOR2_API
#include <gegl.h>
#include <gtk/gtk.h>
@@ -330,11 +331,11 @@ cdisplay_colorblind_convert_buffer (GimpColorDisplay *display,
iter = gegl_buffer_iterator_new (buffer, area, 0,
babl_format ("RGBA float") /* linear! */,
- GEGL_ACCESS_READWRITE, GEGL_ABYSS_NONE);
+ GEGL_ACCESS_READWRITE, GEGL_ABYSS_NONE, 1);
while (gegl_buffer_iterator_next (iter))
{
- gfloat *data = iter->data[0];
+ gfloat *data = iter->items[0].data;
gint count = iter->length;
while (count--)
diff --git a/modules/display-filter-gamma.c b/modules/display-filter-gamma.c
index d49e12f933..0813e47912 100644
--- a/modules/display-filter-gamma.c
+++ b/modules/display-filter-gamma.c
@@ -17,6 +17,7 @@
#include "config.h"
+#define GEGL_ITERATOR2_API
#include <gegl.h>
#include <gtk/gtk.h>
@@ -193,11 +194,11 @@ cdisplay_gamma_convert_buffer (GimpColorDisplay *display,
iter = gegl_buffer_iterator_new (buffer, area, 0,
babl_format ("R'G'B'A float"),
- GEGL_ACCESS_READWRITE, GEGL_ABYSS_NONE);
+ GEGL_ACCESS_READWRITE, GEGL_ABYSS_NONE, 1);
while (gegl_buffer_iterator_next (iter))
{
- gfloat *data = iter->data[0];
+ gfloat *data = iter->items[0].data;
gint count = iter->length;
while (count--)
diff --git a/modules/display-filter-high-contrast.c b/modules/display-filter-high-contrast.c
index e45c28955f..7c7c512738 100644
--- a/modules/display-filter-high-contrast.c
+++ b/modules/display-filter-high-contrast.c
@@ -17,6 +17,7 @@
#include "config.h"
+#define GEGL_ITERATOR2_API
#include <gegl.h>
#include <gtk/gtk.h>
@@ -193,11 +194,11 @@ cdisplay_contrast_convert_buffer (GimpColorDisplay *display,
iter = gegl_buffer_iterator_new (buffer, area, 0,
babl_format ("R'G'B'A float"),
- GEGL_ACCESS_READWRITE, GEGL_ABYSS_NONE);
+ GEGL_ACCESS_READWRITE, GEGL_ABYSS_NONE, 1);
while (gegl_buffer_iterator_next (iter))
{
- gfloat *data = iter->data[0];
+ gfloat *data = iter->items[0].data;
gint count = iter->length;
while (count--)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]