Commit 5f3bdfc8 authored by Michael Natterer's avatar Michael Natterer 😴

Bug 676071 - Make GeglBufferIterator's flags parameter an enum type

Add enum GeglAccessMode { GEGL_ACCESS_READ, _WRITE, _READWRITE } and
change everything to use it. Add compat #defines for the old values.
parent c95e6a6b
......@@ -193,7 +193,7 @@ draw_circle (GeglBuffer *buffer, int x, int y, float r)
iter = gegl_buffer_iterator_new (buffer, &roi, 0,
babl_format ("RGBA float"),
GEGL_BUFFER_READWRITE,
GEGL_ACCESS_READWRITE,
GEGL_ABYSS_NONE);
while (gegl_buffer_iterator_next (iter))
......@@ -307,4 +307,4 @@ run_main_loop (SDL_Surface *main_window,
break;
}
}
}
\ No newline at end of file
}
......@@ -1570,7 +1570,7 @@ gegl_buffer_copy2 (GeglBuffer *src,
dest_rect_r.height = src_rect->height;
i = gegl_buffer_iterator_new (dst, &dest_rect_r, 0, dst->soft_format,
GEGL_BUFFER_WRITE, GEGL_ABYSS_NONE);
GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE);
while (gegl_buffer_iterator_next (i))
{
GeglRectangle src_rect = i->roi[0];
......@@ -1771,7 +1771,7 @@ gegl_buffer_clear2 (GeglBuffer *dst,
* that fully voided tiles are dropped.
*/
i = gegl_buffer_iterator_new (dst, dst_rect, 0, dst->soft_format,
GEGL_BUFFER_WRITE, GEGL_ABYSS_NONE);
GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE);
while (gegl_buffer_iterator_next (i))
{
memset (((guchar*)(i->data[0])), 0, i->length * pxsize);
......@@ -2013,7 +2013,7 @@ gegl_buffer_set_color (GeglBuffer *dst,
* that fully filled tiles are shared.
*/
i = gegl_buffer_iterator_new (dst, dst_rect, 0, dst->soft_format,
GEGL_BUFFER_WRITE, GEGL_ABYSS_NONE);
GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE);
while (gegl_buffer_iterator_next (i))
{
gegl_memset_pattern (i->data[0], pixel, bpp, i->length);
......
......@@ -55,7 +55,7 @@ typedef enum {
typedef struct _SubIterState {
GeglRectangle full_rect; /* The entire area we are iterating over */
GeglBuffer *buffer;
unsigned int flags;
GeglAccessMode access_mode;
GeglAbyssPolicy abyss_policy;
const Babl *format;
gint format_bpp;
......@@ -101,23 +101,24 @@ gegl_buffer_iterator_new (GeglBuffer *buf,
const GeglRectangle *roi,
gint level,
const Babl *format,
unsigned int flags,
GeglAccessMode access_mode,
GeglAbyssPolicy abyss_policy)
{
GeglBufferIterator *iter = gegl_buffer_iterator_empty_new ();
gegl_buffer_iterator_add (iter, buf, roi, level, format, flags, abyss_policy);
gegl_buffer_iterator_add (iter, buf, roi, level, format,
access_mode, abyss_policy);
return iter;
}
int
gegl_buffer_iterator_add (GeglBufferIterator *iter,
gegl_buffer_iterator_add (GeglBufferIterator *iter,
GeglBuffer *buf,
const GeglRectangle *roi,
gint level,
const Babl *format,
unsigned int flags,
GeglAccessMode access_mode,
GeglAbyssPolicy abyss_policy)
{
GeglBufferIteratorPriv *priv = iter->priv;
......@@ -137,13 +138,13 @@ gegl_buffer_iterator_add (GeglBufferIterator *iter,
sub->buffer = buf;
sub->full_rect = *roi;
sub->flags = flags;
sub->access_mode = access_mode;
sub->abyss_policy = abyss_policy;
sub->current_tile = NULL;
sub->real_data = NULL;
sub->linear_tile = NULL;
sub->format = format;
sub->format_bpp = babl_format_get_bytes_per_pixel (format);
sub->abyss_policy = abyss_policy;
if (index > 0)
{
......@@ -166,7 +167,7 @@ release_tile (GeglBufferIterator *iter,
if (sub->current_tile_mode == GeglIteratorTileMode_DirectTile)
{
if (sub->flags & GEGL_BUFFER_WRITE)
if (sub->access_mode & GEGL_ACCESS_WRITE)
gegl_tile_unlock (sub->current_tile);
gegl_tile_unref (sub->current_tile);
......@@ -184,7 +185,7 @@ release_tile (GeglBufferIterator *iter,
}
else if (sub->current_tile_mode == GeglIteratorTileMode_GetBuffer)
{
if (sub->flags & GEGL_BUFFER_WRITE)
if (sub->access_mode & GEGL_ACCESS_WRITE)
{
gegl_buffer_set_unlocked_no_notify (sub->buffer,
&sub->real_roi,
......@@ -320,7 +321,7 @@ get_tile (GeglBufferIterator *iter,
sub->current_tile = gegl_buffer_get_tile (buf, tile_x, tile_y, 0);
if (sub->flags & GEGL_BUFFER_WRITE)
if (sub->access_mode & GEGL_ACCESS_WRITE)
gegl_tile_lock (sub->current_tile);
sub->real_roi.x = (tile_x * tile_width) - shift_x;
......@@ -345,7 +346,7 @@ get_indirect (GeglBufferIterator *iter,
sub->real_data = gegl_malloc (sub->format_bpp * sub->real_roi.width * sub->real_roi.height);
if (sub->flags & GEGL_BUFFER_READ)
if (sub->access_mode & GEGL_ACCESS_READ)
{
gegl_buffer_get_unlocked (sub->buffer, 1.0, &sub->real_roi, sub->format, sub->real_data,
GEGL_AUTO_ROWSTRIDE, sub->abyss_policy);
......@@ -364,7 +365,7 @@ needs_indirect_read (GeglBufferIterator *iter,
GeglBufferIteratorPriv *priv = iter->priv;
SubIterState *sub = &priv->sub_iter[index];
if (sub->flags & GEGL_ITERATOR_INCOMPATIBLE)
if (sub->access_mode & GEGL_ITERATOR_INCOMPATIBLE)
return TRUE;
/* Needs abyss generation */
......@@ -424,7 +425,7 @@ prepare_iteration (GeglBufferIterator *iter)
/* Format converison needed */
if (gegl_buffer_get_format (sub->buffer) != sub->format)
sub->flags |= GEGL_ITERATOR_INCOMPATIBLE;
sub->access_mode |= GEGL_ITERATOR_INCOMPATIBLE;
/* Incompatable tiles */
else if ((priv->origin_tile.width != buf->tile_width) ||
(priv->origin_tile.height != buf->tile_height) ||
......@@ -439,11 +440,11 @@ prepare_iteration (GeglBufferIterator *iter)
{
sub->linear_tile = gegl_buffer_get_tile (sub->buffer, 0, 0, 0);
if (sub->flags & GEGL_BUFFER_WRITE)
if (sub->access_mode & GEGL_ACCESS_WRITE)
gegl_tile_lock (sub->linear_tile);
}
else
sub->flags |= GEGL_ITERATOR_INCOMPATIBLE;
sub->access_mode |= GEGL_ITERATOR_INCOMPATIBLE;
}
gegl_buffer_lock (sub->buffer);
......@@ -509,14 +510,14 @@ gegl_buffer_iterator_stop (GeglBufferIterator *iter)
if (sub->linear_tile)
{
if (sub->flags & GEGL_BUFFER_WRITE)
if (sub->access_mode & GEGL_ACCESS_WRITE)
gegl_tile_unlock (sub->linear_tile);
gegl_tile_unref (sub->linear_tile);
}
gegl_buffer_unlock (sub->buffer);
if (sub->flags & GEGL_BUFFER_WRITE)
if (sub->access_mode & GEGL_ACCESS_WRITE)
gegl_buffer_emit_changed_signal (sub->buffer, &sub->full_rect);
}
......
......@@ -24,9 +24,9 @@
#define GEGL_BUFFER_MAX_ITERATORS 6
#define GEGL_BUFFER_READ 1
#define GEGL_BUFFER_WRITE 2
#define GEGL_BUFFER_READWRITE (GEGL_BUFFER_READ|GEGL_BUFFER_WRITE)
#define GEGL_BUFFER_READ GEGL_ACCESS_READ
#define GEGL_BUFFER_WRITE GEGL_ACCESS_WRITE
#define GEGL_BUFFER_READWRITE GEGL_ACCESS_READWRITE
typedef struct _GeglBufferIteratorPriv GeglBufferIteratorPriv;
......@@ -62,8 +62,8 @@ GeglBufferIterator *gegl_buffer_iterator_empty_new (void);
* @level: the level at which we are iterating, the roi will indicate the
* extent at 1:1, x,y,width and height are/(2^level)
* @format: the format we want to process this buffers data in, pass 0 to use the buffers format.
* @flags: whether we need reading or writing to this buffer one of GEGL_BUFFER_READ, GEGL_BUFFER_WRITE and GEGL_BUFFER_READWRITE.
* @repeat_mode: how request outside the buffer extent are handled.
* @access_mode: whether we need reading or writing to this buffer one of GEGL_BUFFER_READ, GEGL_BUFFER_WRITE and GEGL_BUFFER_READWRITE.
* @abyss_policy: how request outside the buffer extent are handled.
*
* Create a new buffer iterator, this buffer will be iterated through
* in linear chunks, some chunks might be full tiles the coordinates, see
......@@ -77,8 +77,8 @@ GeglBufferIterator * gegl_buffer_iterator_new (GeglBuffer *buffer,
const GeglRectangle *roi,
gint level,
const Babl *format,
guint flags,
GeglAbyssPolicy repeat_mode);
GeglAccessMode access_mode,
GeglAbyssPolicy abyss_policy);
/**
......@@ -89,8 +89,8 @@ GeglBufferIterator * gegl_buffer_iterator_new (GeglBuffer *buffer,
* @level: the level at which we are iterating, the roi will indicate the
* extent at 1:1, x,y,width and height are/(2^level)
* @format: the format we want to process this buffers data in, pass 0 to use the buffers format.
* @flags: whether we need reading or writing to this buffer.
* @repeat_mode: how request outside the buffer extent are handled.
* @access_mode: whether we need reading or writing to this buffer.
* @abyss_policy: how request outside the buffer extent are handled.
*
* Adds an additional buffer iterator that will be processed in sync with
* the original one, if the buffer doesn't align with the other for tile access
......@@ -105,8 +105,8 @@ gint gegl_buffer_iterator_add (GeglBufferIterator *iterator,
const GeglRectangle *roi,
gint level,
const Babl *format,
guint flags,
GeglAbyssPolicy repeat_mode);
GeglAccessMode access_mode,
GeglAbyssPolicy abyss_policy);
/**
* gegl_buffer_iterator_stop: (skip)
......
......@@ -50,6 +50,32 @@ gegl_abyss_policy_get_type (void)
return etype;
}
GType
gegl_access_mode_get_type (void)
{
static GType ftype = 0;
if (ftype == 0)
{
static GFlagsValue values[] = {
{ GEGL_ACCESS_READ, N_("Read"), "read" },
{ GEGL_ACCESS_WRITE, N_("Write"), "write" },
{ GEGL_ACCESS_READWRITE, N_("Read/Wrrite"), "readwrite" },
{ 0, NULL, NULL }
};
gint i;
for (i = 0; i < G_N_ELEMENTS (values); i++)
if (values[i].value_name)
values[i].value_name =
dgettext (GETTEXT_PACKAGE, values[i].value_name);
ftype = g_flags_register_static ("GeglAccessMode", values);
}
return ftype;
}
GType
gegl_orientation_get_type (void)
{
......
......@@ -49,6 +49,17 @@ GType gegl_abyss_policy_get_type (void) G_GNUC_CONST;
#define GEGL_TYPE_ABYSS_POLICY (gegl_abyss_policy_get_type ())
typedef enum {
GEGL_ACCESS_READ = 1 << 0,
GEGL_ACCESS_WRITE = 1 << 1,
GEGL_ACCESS_READWRITE = (GEGL_ACCESS_READ | GEGL_ACCESS_WRITE)
} GeglAccessMode;
GType gegl_access_mode_get_type (void) G_GNUC_CONST;
#define GEGL_TYPE_ACCESS_MODE (gegl_access_mode_get_type ())
typedef enum {
GEGL_ORIENTATION_HORIZONTAL,
GEGL_ORIENTATION_VERTICAL
......
......@@ -221,7 +221,8 @@ gegl_operation_point_composer_process (GeglOperation *operation,
gint threads = gegl_config ()->threads;
GThreadPool *pool = thread_pool ();
ThreadData thread_data[GEGL_MAX_THREADS];
GeglBufferIterator *i = gegl_buffer_iterator_new (output, result, level, output_buf_format, GEGL_BUFFER_WRITE, GEGL_ABYSS_NONE);
GeglBufferIterator *i = gegl_buffer_iterator_new (output, result, level, output_buf_format,
GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE);
gint foo = 0, read = 0;
gint in_bpp = input?babl_format_get_bytes_per_pixel (in_format):0;
......@@ -235,7 +236,8 @@ gegl_operation_point_composer_process (GeglOperation *operation,
if (input)
{
read = gegl_buffer_iterator_add (i, input, result, level, in_buf_format, GEGL_BUFFER_READ, GEGL_ABYSS_NONE);
read = gegl_buffer_iterator_add (i, input, result, level, in_buf_format,
GEGL_ACCESS_READ, GEGL_ABYSS_NONE);
for (gint j = 0; j < threads; j ++)
{
if (in_buf_format != in_format)
......@@ -254,7 +256,8 @@ gegl_operation_point_composer_process (GeglOperation *operation,
thread_data[j].input_fish = NULL;
if (aux)
{
foo = gegl_buffer_iterator_add (i, aux, result, level, aux_buf_format, GEGL_BUFFER_READ, GEGL_ABYSS_NONE);
foo = gegl_buffer_iterator_add (i, aux, result, level, aux_buf_format,
GEGL_ACCESS_READ, GEGL_ABYSS_NONE);
for (gint j = 0; j < threads; j ++)
{
if (aux_buf_format != aux_format)
......@@ -334,13 +337,13 @@ gegl_operation_point_composer_process (GeglOperation *operation,
}
else
{
GeglBufferIterator *i = gegl_buffer_iterator_new (output, result, level, out_format, GEGL_BUFFER_WRITE, GEGL_ABYSS_NONE);
GeglBufferIterator *i = gegl_buffer_iterator_new (output, result, level, out_format, GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE);
gint foo = 0, read = 0;
if (input)
read = gegl_buffer_iterator_add (i, input, result, level, in_format, GEGL_BUFFER_READ, GEGL_ABYSS_NONE);
read = gegl_buffer_iterator_add (i, input, result, level, in_format, GEGL_ACCESS_READ, GEGL_ABYSS_NONE);
if (aux)
foo = gegl_buffer_iterator_add (i, aux, result, level, aux_format, GEGL_BUFFER_READ, GEGL_ABYSS_NONE);
foo = gegl_buffer_iterator_add (i, aux, result, level, aux_format, GEGL_ACCESS_READ, GEGL_ABYSS_NONE);
while (gegl_buffer_iterator_next (i))
{
......
......@@ -240,7 +240,7 @@ gegl_operation_point_composer3_process (GeglOperation *operation,
gint threads = gegl_config ()->threads;
GThreadPool *pool = thread_pool ();
ThreadData thread_data[GEGL_MAX_THREADS];
GeglBufferIterator *i = gegl_buffer_iterator_new (output, result, level, output_buf_format, GEGL_BUFFER_WRITE, GEGL_ABYSS_NONE);
GeglBufferIterator *i = gegl_buffer_iterator_new (output, result, level, output_buf_format, GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE);
gint foo = 0, bar = 0, read = 0;
gint in_bpp = input?babl_format_get_bytes_per_pixel (in_format):0;
......@@ -257,7 +257,7 @@ gegl_operation_point_composer3_process (GeglOperation *operation,
if (input)
{
read = gegl_buffer_iterator_add (i, input, result, level, in_buf_format, GEGL_BUFFER_READ, GEGL_ABYSS_NONE);
read = gegl_buffer_iterator_add (i, input, result, level, in_buf_format, GEGL_ACCESS_READ, GEGL_ABYSS_NONE);
for (gint j = 0; j < threads; j ++)
{
if (in_buf_format != in_format)
......@@ -276,7 +276,8 @@ gegl_operation_point_composer3_process (GeglOperation *operation,
thread_data[j].input_fish = NULL;
if (aux)
{
foo = gegl_buffer_iterator_add (i, aux, result, level, aux_buf_format, GEGL_BUFFER_READ, GEGL_ABYSS_NONE);
foo = gegl_buffer_iterator_add (i, aux, result, level, aux_buf_format,
GEGL_ACCESS_READ, GEGL_ABYSS_NONE);
for (gint j = 0; j < threads; j ++)
{
if (aux_buf_format != aux_format)
......@@ -297,7 +298,8 @@ gegl_operation_point_composer3_process (GeglOperation *operation,
}
if (aux2)
{
bar = gegl_buffer_iterator_add (i, aux2, result, level, aux2_buf_format, GEGL_BUFFER_READ, GEGL_ABYSS_NONE);
bar = gegl_buffer_iterator_add (i, aux2, result, level, aux2_buf_format,
GEGL_ACCESS_READ, GEGL_ABYSS_NONE);
for (gint j = 0; j < threads; j ++)
{
if (aux2_buf_format != aux2_format)
......@@ -378,15 +380,19 @@ gegl_operation_point_composer3_process (GeglOperation *operation,
}
else
{
GeglBufferIterator *i = gegl_buffer_iterator_new (output, result, level, out_format, GEGL_BUFFER_WRITE, GEGL_ABYSS_NONE);
GeglBufferIterator *i = gegl_buffer_iterator_new (output, result, level, out_format,
GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE);
gint foo = 0, bar = 0, read = 0;
if (input)
read = gegl_buffer_iterator_add (i, input, result, level, in_format, GEGL_BUFFER_READ, GEGL_ABYSS_NONE);
read = gegl_buffer_iterator_add (i, input, result, level, in_format,
GEGL_ACCESS_READ, GEGL_ABYSS_NONE);
if (aux)
foo = gegl_buffer_iterator_add (i, aux, result, level, aux_format, GEGL_BUFFER_READ, GEGL_ABYSS_NONE);
foo = gegl_buffer_iterator_add (i, aux, result, level, aux_format,
GEGL_ACCESS_READ, GEGL_ABYSS_NONE);
if (aux2)
bar = gegl_buffer_iterator_add (i, aux2, result, level, aux2_format, GEGL_BUFFER_READ, GEGL_ABYSS_NONE);
bar = gegl_buffer_iterator_add (i, aux2, result, level, aux2_format,
GEGL_ACCESS_READ, GEGL_ABYSS_NONE);
while (gegl_buffer_iterator_next (i))
{
......
......@@ -198,7 +198,7 @@ gegl_operation_point_filter_process (GeglOperation *operation,
gint threads = gegl_config ()->threads;
GThreadPool *pool = thread_pool ();
ThreadData thread_data[GEGL_MAX_THREADS];
GeglBufferIterator *i = gegl_buffer_iterator_new (output, result, level, output_buf_format, GEGL_BUFFER_WRITE, GEGL_ABYSS_NONE);
GeglBufferIterator *i = gegl_buffer_iterator_new (output, result, level, output_buf_format, GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE);
gint read = 0;
gint in_bpp = input?babl_format_get_bytes_per_pixel (in_format):0;
......@@ -209,7 +209,7 @@ gegl_operation_point_filter_process (GeglOperation *operation,
if (input)
{
read = gegl_buffer_iterator_add (i, input, result, level, in_buf_format, GEGL_BUFFER_READ, GEGL_ABYSS_NONE);
read = gegl_buffer_iterator_add (i, input, result, level, in_buf_format, GEGL_ACCESS_READ, GEGL_ABYSS_NONE);
for (gint j = 0; j < threads; j ++)
{
if (in_buf_format != in_format)
......@@ -286,11 +286,13 @@ gegl_operation_point_filter_process (GeglOperation *operation,
}
else
{
GeglBufferIterator *i = gegl_buffer_iterator_new (output, result, level, out_format, GEGL_BUFFER_WRITE, GEGL_ABYSS_NONE);
GeglBufferIterator *i = gegl_buffer_iterator_new (output, result, level, out_format,
GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE);
gint read = 0;
if (input)
read = gegl_buffer_iterator_add (i, input, result, level, in_format, GEGL_BUFFER_READ, GEGL_ABYSS_NONE);
read = gegl_buffer_iterator_add (i, input, result, level, in_format,
GEGL_ACCESS_READ, GEGL_ABYSS_NONE);
while (gegl_buffer_iterator_next (i))
{
......
......@@ -90,7 +90,8 @@ gegl_operation_point_render_process (GeglOperation *operation,
if ((result->width > 0) && (result->height > 0))
{
GeglBufferIterator *i = gegl_buffer_iterator_new (output, result, level, out_format, GEGL_BUFFER_WRITE, GEGL_ABYSS_NONE);
GeglBufferIterator *i = gegl_buffer_iterator_new (output, result, level, out_format,
GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE);
while (gegl_buffer_iterator_next (i))
point_render_class->process (operation, i->data[0], i->length, &i->roi[0], level);
......
......@@ -70,10 +70,11 @@ static void c2g (GeglBuffer *src,
gdouble rgamma)
{
const Babl *format = babl_format ("RGBA float");
if (dst_rect->width > 0 && dst_rect->height > 0)
{
GeglBufferIterator *i = gegl_buffer_iterator_new (dst, dst_rect, 0, babl_format("YA float"), GEGL_BUFFER_WRITE, GEGL_ABYSS_NONE);
GeglBufferIterator *i = gegl_buffer_iterator_new (dst, dst_rect, 0, babl_format("YA float"),
GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE);
GeglSampler *sampler = gegl_buffer_sampler_new (src, format, GEGL_SAMPLER_NEAREST);
while (gegl_buffer_iterator_next (i))
......
......@@ -238,9 +238,9 @@ process (GeglOperation *operation,
ramp = compute_ramp (sampler1, sampler2, result, o->pct_black);
iter = gegl_buffer_iterator_new (output, result, 0, babl_format ("Y'CbCrA float"),
GEGL_BUFFER_WRITE, GEGL_ABYSS_NONE);
GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE);
gegl_buffer_iterator_add (iter, input, result, 0, babl_format ("Y'CbCrA float"),
GEGL_BUFFER_READ, GEGL_ABYSS_NONE);
GEGL_ACCESS_READ, GEGL_ABYSS_NONE);
while (gegl_buffer_iterator_next (iter))
......
......@@ -311,10 +311,11 @@ operation_source_process (GeglOperation *operation,
return TRUE;
}
iter = gegl_buffer_iterator_new (output, result, level, out_format, GEGL_BUFFER_WRITE, GEGL_ABYSS_NONE);
iter = gegl_buffer_iterator_new (output, result, level, out_format,
GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE);
while (gegl_buffer_iterator_next (iter))
checkerboard_process (operation, iter->data[0], iter->length, &iter->roi[0], level);
checkerboard_process (operation, iter->data[0], iter->length, &iter->roi[0], level);
}
return TRUE;
}
......
......@@ -387,10 +387,10 @@ process_standard (GeglBuffer *input,
generate_channel_masks (channel_bits, channel_mask);
gi = gegl_buffer_iterator_new (input, result, 0, babl_format ("R'G'B'A u16"),
GEGL_BUFFER_READ, GEGL_ABYSS_NONE);
GEGL_ACCESS_READ, GEGL_ABYSS_NONE);
gegl_buffer_iterator_add (gi, output, result, 0, babl_format ("R'G'B'A u16"),
GEGL_BUFFER_WRITE, GEGL_ABYSS_NONE);
GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE);
while (gegl_buffer_iterator_next (gi))
{
......
......@@ -93,13 +93,13 @@ process (GeglOperation *operation,
diff_buffer = gegl_buffer_new (result, yadbl);
iter = gegl_buffer_iterator_new (diff_buffer, result, 0, yadbl,
GEGL_BUFFER_WRITE, GEGL_ABYSS_NONE);
GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE);
gegl_buffer_iterator_add (iter, input, result, 0, cielab,
GEGL_BUFFER_READ, GEGL_ABYSS_NONE);
GEGL_ACCESS_READ, GEGL_ABYSS_NONE);
gegl_buffer_iterator_add (iter, aux, result, 0, cielab,
GEGL_BUFFER_READ, GEGL_ABYSS_NONE);
GEGL_ACCESS_READ, GEGL_ABYSS_NONE);
while (gegl_buffer_iterator_next (iter))
{
......@@ -140,10 +140,10 @@ process (GeglOperation *operation,
}
iter = gegl_buffer_iterator_new (output, result, 0, srgb,
GEGL_BUFFER_WRITE, GEGL_ABYSS_NONE);
GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE);
gegl_buffer_iterator_add (iter, diff_buffer, result, 0, yadbl,
GEGL_BUFFER_READ, GEGL_ABYSS_NONE);
GEGL_ACCESS_READ, GEGL_ABYSS_NONE);
while (gegl_buffer_iterator_next (iter))
{
......
......@@ -74,11 +74,14 @@ process (GeglOperation *operation,
if (aux != NULL)
{
it = gegl_buffer_iterator_new (output, result, level, format_io, GEGL_BUFFER_WRITE, GEGL_ABYSS_NONE);
it = gegl_buffer_iterator_new (output, result, level, format_io,
GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE);
index_out = 0;
index_coords = gegl_buffer_iterator_add (it, aux, result, level, format_coords, GEGL_BUFFER_READ, GEGL_ABYSS_NONE);
index_in = gegl_buffer_iterator_add (it, input, result, level, format_io, GEGL_BUFFER_READ, GEGL_ABYSS_NONE);
index_coords = gegl_buffer_iterator_add (it, aux, result, level, format_coords,
GEGL_ACCESS_READ, GEGL_ABYSS_NONE);
index_in = gegl_buffer_iterator_add (it, input, result, level, format_io,
GEGL_ACCESS_READ, GEGL_ABYSS_NONE);
while (gegl_buffer_iterator_next (it))
{
......
......@@ -79,11 +79,14 @@ process (GeglOperation *operation,
if (aux != NULL)
{
it = gegl_buffer_iterator_new (output, result, level, format_io, GEGL_BUFFER_WRITE, GEGL_ABYSS_NONE);
it = gegl_buffer_iterator_new (output, result, level, format_io,
GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE);
index_out = 0;
index_coords = gegl_buffer_iterator_add (it, aux, result, level, format_coords, GEGL_BUFFER_READ, GEGL_ABYSS_NONE);
index_in = gegl_buffer_iterator_add (it, input, result, level, format_io, GEGL_BUFFER_READ, GEGL_ABYSS_NONE);
index_coords = gegl_buffer_iterator_add (it, aux, result, level, format_coords,
GEGL_ACCESS_READ, GEGL_ABYSS_NONE);
index_in = gegl_buffer_iterator_add (it, input, result, level, format_io,
GEGL_ACCESS_READ, GEGL_ABYSS_NONE);
while (gegl_buffer_iterator_next (it))
{
......
......@@ -395,7 +395,7 @@ process (GeglOperation *operation,
}
iter = gegl_buffer_iterator_new (out_buf, roi, level, out_format,
GEGL_BUFFER_WRITE, GEGL_ABYSS_NONE);
GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE);
while (gegl_buffer_iterator_next (iter))
c_process (operation, iter->data[0], iter->length, &iter->roi[0], level);
......
......@@ -86,7 +86,7 @@ process (GeglOperation *operation,
bpp = babl_format_get_bytes_per_pixel (format);
gi = gegl_buffer_iterator_new (output, result, 0, format,
GEGL_BUFFER_WRITE, GEGL_ABYSS_CLAMP);
GEGL_ACCESS_WRITE, GEGL_ABYSS_CLAMP);
while (gegl_buffer_iterator_next (gi))
{
......
......@@ -297,7 +297,7 @@ process (GeglOperation *operation,
}
iter = gegl_buffer_iterator_new (out_buf, roi, level, out_format,
GEGL_BUFFER_WRITE, GEGL_ABYSS_NONE);
GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE);
while (gegl_buffer_iterator_next (iter))
c_process (operation, iter->data[0], iter->length, &iter->roi[0], level);
......
......@@ -87,7 +87,7 @@ process (GeglOperation *operation,
bpp = babl_format_get_bytes_per_pixel (format);
gi = gegl_buffer_iterator_new (output, result, 0, format,
GEGL_BUFFER_WRITE, GEGL_ABYSS_CLAMP);
GEGL_ACCESS_WRITE, GEGL_ABYSS_CLAMP);
while (gegl_buffer_iterator_next (gi))
{
......
......@@ -113,7 +113,7 @@ process (GeglOperation *operation,
bpp = babl_format_get_bytes_per_pixel (format);
gi = gegl_buffer_iterator_new (output, result, 0, format,
GEGL_BUFFER_WRITE, GEGL_ABYSS_CLAMP);
GEGL_ACCESS_WRITE, GEGL_ABYSS_CLAMP);
while (gegl_buffer_iterator_next (gi))
{
......
......@@ -376,7 +376,8 @@ process (GeglOperation *operation,
{
float ud = ((1.0/transform.width));
float vd = ((1.0/transform.height));
it = gegl_buffer_iterator_new (output, result, level, format_io, GEGL_BUFFER_WRITE, GEGL_ABYSS_NONE);
it = gegl_buffer_iterator_new (output, result, level, format_io,
GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE);
index_out = 0;
while (gegl_buffer_iterator_next (it))
......
......@@ -142,11 +142,11 @@ compute_ramp (GeglBuffer *dest1,
iter = gegl_buffer_iterator_new (dest1, roi, 0,
babl_format ("Y float"),
GEGL_BUFFER_READ,
GEGL_ACCESS_READ,
GEGL_ABYSS_NONE);
gegl_buffer_iterator_add (iter, dest2, roi, 0,
babl_format ("Y float"),
GEGL_BUFFER_READ,
GEGL_ACCESS_READ,
GEGL_ABYSS_NONE);
memset (hist1, 0, sizeof (int) * 2000);
......@@ -251,15 +251,15 @@ process (GeglOperation *operation,
iter = gegl_buffer_iterator_new (dest1, result, 0,
babl_format ("Y float"),
GEGL_BUFFER_READ,
GEGL_ACCESS_READ,
GEGL_ABYSS_NONE);
gegl_buffer_iterator_add (iter, dest2, result, 0,
babl_format ("Y float"),
GEGL_BUFFER_READ,
GEGL_ACCESS_READ,
GEGL_ABYSS_NONE);
gegl_buffer_iterator_add (iter, output, result, 0,
babl_format ("Y float"),
GEGL_BUFFER_WRITE,
GEGL_ACCESS_WRITE,
GEGL_ABYSS_NONE);
while (gegl_buffer_iterator_next (iter))
......
......@@ -117,7 +117,7 @@ mean_rectangle_noalloc (GeglBuffer *input,
gint c;
gi = gegl_buffer_iterator_new (input, rect, 0, babl_format ("RaGaBaA float"),
GEGL_BUFFER_READ, GEGL_ABYSS_CLAMP);
GEGL_ACCESS_READ, GEGL_ABYSS_CLAMP);
while (gegl_buffer_iterator_next (gi))
{
......@@ -238,7 +238,7 @@ set_rectangle_noalloc (GeglBuffer *output,
gegl_color_get_pixel (color, babl_format ("RaGaBaA float"), col);
gi = gegl_buffer_iterator_new (output, rect, 0, babl_format ("RaGaBaA float"),
GEGL_BUFFER_WRITE, GEGL_ABYSS_CLAMP);
GEGL_ACCESS_WRITE, GEGL_ABYSS_CLAMP);
while (gegl_buffer_iterator_next (gi))
{
......
......@@ -99,7 +99,7 @@ process (GeglOperation *operation,
GeglAbyssPolicy abyss = o->tileable ? GEGL_ABYSS_LOOP : GEGL_ABYSS_NONE;
iter = gegl_buffer_iterator_new (output, result, 0, babl_format ("RGBA float"),
GEGL_BUFFER_WRITE, GEGL_ABYSS_NONE);
GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE);
while (gegl_buffer_iterator_next (iter))
{
......
......@@ -147,10 +147,10 @@ process (GeglOperation *operation,
dest_tmp = gegl_buffer_new (&working_region, babl_format ("Y' float"));
iter = gegl_buffer_iterator_new (dest_tmp, &working_region, 0, babl_format ("Y' float"),
GEGL_BUFFER_WRITE, GEGL_ABYSS_NONE);
GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE);
gegl_buffer_iterator_add (iter, input, &working_region, 0, babl_format ("Y' float"),
GEGL_BUFFER_READ, GEGL_ABYSS_NONE);
GEGL_ACCESS_READ, GEGL_ABYSS_NONE);
while (gegl_buffer_iterator_next (iter))
{
......@@ -174,13 +174,13 @@ process (GeglOperation *operation,
dest = grey_blur_buffer (dest_tmp, o->glow_radius, result);
iter = gegl_buffer_iterator_new (output, result, 0, babl_format ("RGBA float"),
GEGL_BUFFER_WRITE, GEGL_ABYSS_NONE);
GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE);