Commit 41e80356 authored by Øyvind "pippin" Kolås's avatar Øyvind "pippin" Kolås

modules: migrate display filters to new iterator api

parent 6761da42
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <string.h> #include <string.h>
#define GEGL_ITERATOR2_API
#include <gegl.h> #include <gegl.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
...@@ -353,14 +354,14 @@ cdisplay_clip_warning_convert_buffer (GimpColorDisplay *display, ...@@ -353,14 +354,14 @@ cdisplay_clip_warning_convert_buffer (GimpColorDisplay *display,
iter = gegl_buffer_iterator_new (buffer, area, 0, iter = gegl_buffer_iterator_new (buffer, area, 0,
babl_format ("R'G'B'A float"), 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)) while (gegl_buffer_iterator_next (iter))
{ {
gfloat *data = iter->data[0]; gfloat *data = iter->items[0].data;
gint count = iter->length; gint count = iter->length;
gint x = iter->roi[0].x; gint x = iter->items[0].roi.x;
gint y = iter->roi[0].y; gint y = iter->items[0].roi.y;
while (count--) while (count--)
{ {
...@@ -406,9 +407,9 @@ cdisplay_clip_warning_convert_buffer (GimpColorDisplay *display, ...@@ -406,9 +407,9 @@ cdisplay_clip_warning_convert_buffer (GimpColorDisplay *display,
data += 4; 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++; y++;
} }
} }
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <string.h> #include <string.h>
#define GEGL_ITERATOR2_API
#include <gegl.h> #include <gegl.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
...@@ -330,11 +331,11 @@ cdisplay_colorblind_convert_buffer (GimpColorDisplay *display, ...@@ -330,11 +331,11 @@ cdisplay_colorblind_convert_buffer (GimpColorDisplay *display,
iter = gegl_buffer_iterator_new (buffer, area, 0, iter = gegl_buffer_iterator_new (buffer, area, 0,
babl_format ("RGBA float") /* linear! */, babl_format ("RGBA float") /* linear! */,
GEGL_ACCESS_READWRITE, GEGL_ABYSS_NONE); GEGL_ACCESS_READWRITE, GEGL_ABYSS_NONE, 1);
while (gegl_buffer_iterator_next (iter)) while (gegl_buffer_iterator_next (iter))
{ {
gfloat *data = iter->data[0]; gfloat *data = iter->items[0].data;
gint count = iter->length; gint count = iter->length;
while (count--) while (count--)
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include "config.h" #include "config.h"
#define GEGL_ITERATOR2_API
#include <gegl.h> #include <gegl.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
...@@ -193,11 +194,11 @@ cdisplay_gamma_convert_buffer (GimpColorDisplay *display, ...@@ -193,11 +194,11 @@ cdisplay_gamma_convert_buffer (GimpColorDisplay *display,
iter = gegl_buffer_iterator_new (buffer, area, 0, iter = gegl_buffer_iterator_new (buffer, area, 0,
babl_format ("R'G'B'A float"), 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)) while (gegl_buffer_iterator_next (iter))
{ {
gfloat *data = iter->data[0]; gfloat *data = iter->items[0].data;
gint count = iter->length; gint count = iter->length;
while (count--) while (count--)
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include "config.h" #include "config.h"
#define GEGL_ITERATOR2_API
#include <gegl.h> #include <gegl.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
...@@ -193,11 +194,11 @@ cdisplay_contrast_convert_buffer (GimpColorDisplay *display, ...@@ -193,11 +194,11 @@ cdisplay_contrast_convert_buffer (GimpColorDisplay *display,
iter = gegl_buffer_iterator_new (buffer, area, 0, iter = gegl_buffer_iterator_new (buffer, area, 0,
babl_format ("R'G'B'A float"), 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)) while (gegl_buffer_iterator_next (iter))
{ {
gfloat *data = iter->data[0]; gfloat *data = iter->items[0].data;
gint count = iter->length; gint count = iter->length;
while (count--) while (count--)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment