[gimp/gimp-2-10] libgimpcolor: migrate to new iterator api
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-10] libgimpcolor: migrate to new iterator api
- Date: Tue, 18 Sep 2018 10:38:05 +0000 (UTC)
commit 33dd7daa3062d4d2228bbbad13376b8f345b6ce8
Author: Øyvind Kolås <pippin gimp org>
Date: Tue Sep 11 01:37:42 2018 +0200
libgimpcolor: migrate to new iterator api
(cherry picked from commit cdda37f4ee556c09263f23f0366a3ce7d44604a9)
libgimpcolor/gimpcolortransform.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/libgimpcolor/gimpcolortransform.c b/libgimpcolor/gimpcolortransform.c
index 27264ef1ee..acea276325 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"
@@ -488,7 +489,7 @@ gimp_color_transform_process_buffer (GimpColorTransform *transform,
iter = gegl_buffer_iterator_new (src_buffer, src_rect, 0,
priv->src_format,
GEGL_ACCESS_READ,
- GEGL_ABYSS_NONE);
+ GEGL_ABYSS_NONE, 2);
gegl_buffer_iterator_add (iter, dest_buffer, dest_rect, 0,
priv->dest_format,
@@ -500,15 +501,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 /
@@ -520,22 +521,22 @@ gimp_color_transform_process_buffer (GimpColorTransform *transform,
iter = gegl_buffer_iterator_new (src_buffer, src_rect, 0,
priv->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]