[gimp] libgimpcolor: migrate to new iterator api
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] libgimpcolor: migrate to new iterator api
- Date: Wed, 12 Sep 2018 11:56:11 +0000 (UTC)
commit cdda37f4ee556c09263f23f0366a3ce7d44604a9
Author: Øyvind Kolås <pippin gimp org>
Date: Tue Sep 11 01:37:42 2018 +0200
libgimpcolor: migrate to new iterator api
libgimpcolor/gimpcolortransform.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/libgimpcolor/gimpcolortransform.c b/libgimpcolor/gimpcolortransform.c
index 2ddc0f6563..b99c1f6e52 100644
--- a/libgimpcolor/gimpcolortransform.c
+++ b/libgimpcolor/gimpcolortransform.c
@@ -28,6 +28,7 @@
#include <lcms2.h>
#include <gio/gio.h>
+#define GEGL_ITERATOR2_API
#include <gegl.h>
#include "libgimpbase/gimpbase.h"
@@ -555,7 +556,7 @@ gimp_color_transform_process_buffer (GimpColorTransform *transform,
iter = gegl_buffer_iterator_new (src_buffer, src_rect, 0,
src_format,
GEGL_ACCESS_READ,
- GEGL_ABYSS_NONE);
+ GEGL_ABYSS_NONE, 2);
gegl_buffer_iterator_add (iter, dest_buffer, dest_rect, 0,
dest_format,
@@ -567,15 +568,15 @@ gimp_color_transform_process_buffer (GimpColorTransform *transform,
if (priv->transform)
{
cmsDoTransform (priv->transform,
- iter->data[0], iter->data[1], iter->length);
+ iter->items[0].data, iter->items[1].data, iter->length);
}
else
{
babl_process (priv->fish,
- iter->data[0], iter->data[1], iter->length);
+ iter->items[0].data, iter->items[1].data, iter->length);
}
- done_pixels += iter->roi[0].width * iter->roi[0].height;
+ done_pixels += iter->items[0].roi.width * iter->items[0].roi.height;
g_signal_emit (transform, gimp_color_transform_signals[PROGRESS], 0,
(gdouble) done_pixels /
@@ -587,22 +588,22 @@ gimp_color_transform_process_buffer (GimpColorTransform *transform,
iter = gegl_buffer_iterator_new (src_buffer, src_rect, 0,
src_format,
GEGL_ACCESS_READWRITE,
- GEGL_ABYSS_NONE);
+ GEGL_ABYSS_NONE, 1);
while (gegl_buffer_iterator_next (iter))
{
if (priv->transform)
{
cmsDoTransform (priv->transform,
- iter->data[0], iter->data[0], iter->length);
+ iter->items[0].data, iter->items[0].data, iter->length);
}
else
{
babl_process (priv->fish,
- iter->data[0], iter->data[0], iter->length);
+ iter->items[0].data, iter->items[0].data, iter->length);
}
- done_pixels += iter->roi[0].width * iter->roi[0].height;
+ done_pixels += iter->items[0].roi.width * iter->items[0].roi.height;
g_signal_emit (transform, gimp_color_transform_signals[PROGRESS], 0,
(gdouble) done_pixels /
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]