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

libgimpcolor: migrate to new iterator api

parent 41e80356
......@@ -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 /
......
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