Commit 6576e8de authored by Øyvind Kolås's avatar Øyvind Kolås

added rowstride parameter to gegl_buffer_set, changing it to be

* gegl/buffer/gegl-buffer.[ch]: added rowstride parameter to
gegl_buffer_set, changing it to be GEGL_AUTO_ROWSTRIDE should 
preserve previous behaviour.
* gegl/operation/gegl-operation-point-composer.c:
* gegl/operation/gegl-operation-point-filter.c: 
* gegl/process/gegl-processor.c: 
* operations/affine/affine.c: 
* operations/blur/box-blur.c: 
* operations/blur/gaussian-blur.c:
* operations/color/mono-mixer.c:
* operations/color/remap.c: 
* operations/color/stretch-contrast.c:
* operations/enhance/bilateral-filter.c:
* operations/enhance/snn-mean.c:
* operations/io/jpg-load.c: 
* operations/io/pixbuf.c:
* operations/io/png-load.c:
* operations/io/raw-load.c:
* operations/io/svg-load.c: 
* operations/render/FractalExplorer.c:
* operations/render/checkerboard.c: 
* operations/render/color.c: 
* operations/render/noise.c: 
* operations/render/text.c: added GEGL_AUTO_ROWSTRIDE to instances of
gegl_buffer_set.
* operations/workshop/box-max.c:
* operations/workshop/box-min.c: 
* operations/workshop/box-percentile.c: 
* operations/workshop/c2g.c: 
* operations/workshop/demosaic-simple.c:
* operations/workshop/disc-percentile.c: 
* operations/workshop/gtk-display.c: 
* operations/workshop/hstack.c:
* operations/workshop/kuwahara-max.c: 
* operations/workshop/kuwahara-min.c: 
* operations/workshop/kuwahara.c: 
* operations/workshop/line-profile.c:
* operations/workshop/mandelbrot.c: 
* operations/workshop/max-envelope.c: 
* operations/workshop/mblur.c: 
* operations/workshop/min-envelope.c:
* operations/workshop/rawbayer-load.c:
* operations/workshop/snn-percentile.c: 
* operations/workshop/stress.c:  updated for constified
GeglRectangles, babl formats and added rowstride to gegl_buffer_set.

svn path=/trunk/; revision=1779
parent 62575664
2007-12-29 Øyvind Kolås <pippin@gimp.org>
* gegl/buffer/gegl-buffer.[ch]: added rowstride parameter to
gegl_buffer_set, changing it to be GEGL_AUTO_ROWSTRIDE should
preserve previous behaviour.
* gegl/operation/gegl-operation-point-composer.c:
* gegl/operation/gegl-operation-point-filter.c:
* gegl/process/gegl-processor.c:
* operations/affine/affine.c:
* operations/blur/box-blur.c:
* operations/blur/gaussian-blur.c:
* operations/color/mono-mixer.c:
* operations/color/remap.c:
* operations/color/stretch-contrast.c:
* operations/enhance/bilateral-filter.c:
* operations/enhance/snn-mean.c:
* operations/io/jpg-load.c:
* operations/io/pixbuf.c:
* operations/io/png-load.c:
* operations/io/raw-load.c:
* operations/io/svg-load.c:
* operations/render/FractalExplorer.c:
* operations/render/checkerboard.c:
* operations/render/color.c:
* operations/render/noise.c:
* operations/render/text.c: added GEGL_AUTO_ROWSTRIDE to instances of
gegl_buffer_set.
* operations/workshop/box-max.c:
* operations/workshop/box-min.c:
* operations/workshop/box-percentile.c:
* operations/workshop/c2g.c:
* operations/workshop/demosaic-simple.c:
* operations/workshop/disc-percentile.c:
* operations/workshop/gtk-display.c:
* operations/workshop/hstack.c:
* operations/workshop/kuwahara-max.c:
* operations/workshop/kuwahara-min.c:
* operations/workshop/kuwahara.c:
* operations/workshop/line-profile.c:
* operations/workshop/mandelbrot.c:
* operations/workshop/max-envelope.c:
* operations/workshop/mblur.c:
* operations/workshop/min-envelope.c:
* operations/workshop/rawbayer-load.c:
* operations/workshop/snn-percentile.c:
* operations/workshop/stress.c: updated for constified
GeglRectangles, babl formats and added rowstride to gegl_buffer_set.
2007-12-29 Sven Neumann <sven@gimp.org>
* gegl/graph/gegl-node.c (set_property): pass NULL as varargs to
......
......@@ -1213,7 +1213,8 @@ void
gegl_buffer_set (GeglBuffer *buffer,
const GeglRectangle *rect,
const Babl *format,
void *src)
void *src,
gint rowstride)
{
GeglBuffer *sub_buf;
......@@ -1822,7 +1823,7 @@ gegl_buffer_copy (GeglBuffer *src,
for (i=0; i<src_rect->height; i++)
{
gegl_buffer_get (src, 1.0, &src_line, format, temp, GEGL_AUTO_ROWSTRIDE);
gegl_buffer_set (dst, &dst_line, format, temp);
gegl_buffer_set (dst, &dst_line, format, temp, GEGL_AUTO_ROWSTRIDE);
src_line.y++;
dst_line.y++;
}
......
......@@ -168,7 +168,8 @@ void gegl_buffer_get (GeglBuffer *buffer,
void gegl_buffer_set (GeglBuffer *buffer,
const GeglRectangle *rect,
const Babl *format,
void *src);
void *src,
gint rowstride);
/**
......
......@@ -142,7 +142,7 @@ process_inner (GeglOperation *operation,
output->extent.width * output->extent.height);
}
gegl_buffer_set (output, NULL, out_format, out_buf);
gegl_buffer_set (output, NULL, out_format, out_buf, GEGL_AUTO_ROWSTRIDE);
g_free (in_buf);
if (in_format != out_format)
......
......@@ -104,7 +104,7 @@ process_inner (GeglOperation *operation,
buf,
output->extent.width * output->extent.height);
gegl_buffer_set (output, result, out_format, buf);
gegl_buffer_set (output, result, out_format, buf, GEGL_AUTO_ROWSTRIDE);
g_free (buf);
}
else
......@@ -124,7 +124,7 @@ process_inner (GeglOperation *operation,
out_buf,
output->extent.width * output->extent.height);
gegl_buffer_set (output, result, out_format, out_buf);
gegl_buffer_set (output, result, out_format, out_buf, GEGL_AUTO_ROWSTRIDE);
g_free (in_buf);
g_free (out_buf);
}
......
......@@ -350,7 +350,7 @@ static gboolean render_rectangle (GeglProcessor *processor)
g_assert (buf);
gegl_node_blit (cache->node, 1.0, dr, cache->format, buf, GEGL_AUTO_ROWSTRIDE, GEGL_BLIT_DEFAULT);
gegl_buffer_set (GEGL_BUFFER (cache), dr, cache->format, buf);
gegl_buffer_set (GEGL_BUFFER (cache), dr, cache->format, buf, GEGL_AUTO_ROWSTRIDE);
gegl_cache_computed (cache, (GeglRectangle *) dr);
......
......@@ -650,7 +650,7 @@ affine_generic (GeglBuffer *dest,
v_start += inverse [1][1];
}
gegl_buffer_sample_cleanup (src);
gegl_buffer_set (dest, NULL, format, dest_buf);
gegl_buffer_set (dest, NULL, format, dest_buf, GEGL_AUTO_ROWSTRIDE);
g_free (dest_buf);
}
......
......@@ -187,7 +187,7 @@ hor_blur (GeglBuffer *src,
dst_buf [offset++] = components[i];
}
gegl_buffer_set (dst, NULL, babl_format ("RaGaBaA float"), dst_buf);
gegl_buffer_set (dst, NULL, babl_format ("RaGaBaA float"), dst_buf, GEGL_AUTO_ROWSTRIDE);
g_free (src_buf);
g_free (dst_buf);
}
......@@ -229,7 +229,7 @@ ver_blur (GeglBuffer *src,
dst_buf [offset++] = components[c];
}
gegl_buffer_set (dst, NULL, babl_format ("RaGaBaA float"), dst_buf);
gegl_buffer_set (dst, NULL, babl_format ("RaGaBaA float"), dst_buf, GEGL_AUTO_ROWSTRIDE);
g_free (src_buf);
g_free (dst_buf);
}
......
......@@ -244,7 +244,7 @@ iir_young_hor_blur (GeglBuffer *src,
}
}
gegl_buffer_set (dst, NULL, babl_format ("RaGaBaA float"), buf);
gegl_buffer_set (dst, NULL, babl_format ("RaGaBaA float"), buf, GEGL_AUTO_ROWSTRIDE);
g_free (buf);
g_free (w);
}
......@@ -283,7 +283,8 @@ iir_young_ver_blur (GeglBuffer *src,
}
}
gegl_buffer_set (dst, gegl_buffer_get_extent (src), babl_format ("RaGaBaA float"), buf);
gegl_buffer_set (dst, gegl_buffer_get_extent (src),
babl_format ("RaGaBaA float"), buf, GEGL_AUTO_ROWSTRIDE);
g_free (buf);
g_free (w);
}
......@@ -401,7 +402,8 @@ fir_hor_blur (GeglBuffer *src,
cmatrix);
}
gegl_buffer_set (dst, NULL, babl_format ("RaGaBaA float"), dst_buf);
gegl_buffer_set (dst, NULL, babl_format ("RaGaBaA float"), dst_buf,
GEGL_AUTO_ROWSTRIDE);
g_free (src_buf);
g_free (dst_buf);
}
......@@ -443,7 +445,8 @@ fir_ver_blur (GeglBuffer *src,
}
gegl_buffer_set (dst, NULL, babl_format ("RaGaBaA float"), dst_buf);
gegl_buffer_set (dst, NULL, babl_format ("RaGaBaA float"), dst_buf,
GEGL_AUTO_ROWSTRIDE);
g_free (src_buf);
g_free (dst_buf);
}
......
......@@ -78,7 +78,8 @@ process (GeglOperation *operation,
out_pixel += 2;
}
gegl_buffer_set (output, result_rect, output->format, out_buf);
gegl_buffer_set (output, result_rect, output->format, out_buf,
GEGL_AUTO_ROWSTRIDE);
g_free (in_buf);
g_free (out_buf);
......
......@@ -177,7 +177,8 @@ process (GeglOperation *operation,
}
}
gegl_buffer_set (output, result, babl_format ("RGBA float"), buf);
gegl_buffer_set (output, result, babl_format ("RGBA float"), buf,
GEGL_AUTO_ROWSTRIDE);
g_free (buf);
g_free (min);
......
......@@ -114,7 +114,8 @@ process (GeglOperation *operation,
gegl_buffer_get (input, 1.0, &line, babl_format ("RGBA float"), buf, GEGL_AUTO_ROWSTRIDE);
inner_process (min, max, buf, result->width * chunk);
gegl_buffer_set (output, &line, babl_format ("RGBA float"), buf);
gegl_buffer_set (output, &line, babl_format ("RGBA float"), buf,
GEGL_AUTO_ROWSTRIDE);
consumed+=chunk;
}
g_free (buf);
......
......@@ -153,7 +153,8 @@ bilateral_filter (GeglBuffer *src,
dst_buf[offset*4+u] = accumulated[u]/count;
offset++;
}
gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf);
gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf,
GEGL_AUTO_ROWSTRIDE);
g_free (src_buf);
g_free (dst_buf);
}
......
......@@ -183,7 +183,8 @@ snn_mean (GeglBuffer *src,
dst_buf[offset*4+u] = accumulated[u]/count;
offset++;
}
gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf);
gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf,
GEGL_AUTO_ROWSTRIDE);
g_free (src_buf);
g_free (dst_buf);
}
......
......@@ -188,7 +188,8 @@ gegl_buffer_import_jpg (GeglBuffer *gegl_buffer,
GeglRectangle rect = {dest_x, dest_y + row++, cinfo.output_width, 1};
jpeg_read_scanlines (&cinfo, buffer, 1);
gegl_buffer_set (gegl_buffer, &rect, babl_format ("R'G'B' u8"), buffer[0]);
gegl_buffer_set (gegl_buffer, &rect, babl_format ("R'G'B' u8"), buffer[0],
GEGL_AUTO_ROWSTRIDE);
}
jpeg_destroy_decompress (&cinfo);
fclose (infile);
......
......@@ -43,7 +43,8 @@ process (GeglOperation *operation,
gdk_pixbuf_get_height (self->pixbuf)};
GeglBuffer *output = gegl_buffer_new (&extent,
babl_format(gdk_pixbuf_get_has_alpha(self->pixbuf)?"R'G'B'A u8":"R'G'B' u8"));
gegl_buffer_set (output, NULL, NULL, gdk_pixbuf_get_pixels (self->pixbuf));
gegl_buffer_set (output, NULL, NULL, gdk_pixbuf_get_pixels (self->pixbuf),
GEGL_AUTO_ROWSTRIDE);
gegl_operation_set_data (operation, context_id, "output", G_OBJECT (output));
}
return TRUE;
......
......@@ -283,7 +283,8 @@ gegl_buffer_import_png (GeglBuffer *gegl_buffer,
gegl_buffer_get (gegl_buffer, 1.0, &rect, format, pixels, GEGL_AUTO_ROWSTRIDE);
png_read_rows (load_png_ptr, &pixels, NULL, 1);
gegl_buffer_set (gegl_buffer, &rect, format, pixels);
gegl_buffer_set (gegl_buffer, &rect, format, pixels,
GEGL_AUTO_ROWSTRIDE);
}
}
}
......
......@@ -127,7 +127,8 @@ load_buffer (GeglChantOperation *op_raw_load)
babl_component ("B"),
babl_component ("R"),
NULL),
buf
buf,
GEGL_AUTO_ROWSTRIDE
);
g_free (buf);
}
......
......@@ -173,7 +173,7 @@ instead.
GeglRectangle rect = {dest_x, dest_y, width, height};
pixeldata = gdk_pixbuf_get_pixels (pixbuf);
gegl_buffer_set (gegl_buffer, &rect, babl_format ("R'G'B'A u8"), pixeldata);
gegl_buffer_set (gegl_buffer, &rect, babl_format ("R'G'B'A u8"), pixeldata, GEGL_AUTO_ROWSTRIDE);
}
rsvg_term();
......
......@@ -418,7 +418,8 @@ process (GeglOperation *operation,
}
}
gegl_buffer_set (output, NULL, babl_format ("R'G'B' u8"), buf);
gegl_buffer_set (output, NULL, babl_format ("R'G'B' u8"), buf,
GEGL_AUTO_ROWSTRIDE);
g_free (buf);
}
return TRUE;
......
......@@ -102,7 +102,7 @@ process (GeglOperation *operation,
}
}
}
gegl_buffer_set (output, NULL, NULL, buf);
gegl_buffer_set (output, NULL, NULL, buf, GEGL_AUTO_ROWSTRIDE);
g_free (buf);
}
return TRUE;
......
......@@ -70,7 +70,7 @@ process (GeglOperation *operation,
dst += 4;
}
}
gegl_buffer_set (output, NULL, NULL, buf);
gegl_buffer_set (output, NULL, NULL, buf, GEGL_AUTO_ROWSTRIDE);
g_free (buf);
}
return TRUE;
......
......@@ -73,7 +73,8 @@ process (GeglOperation *operation,
}
}
}
gegl_buffer_set (output, NULL, babl_format ("Y float"), buf);
gegl_buffer_set (output, NULL, babl_format ("Y float"), buf,
GEGL_AUTO_ROWSTRIDE);
g_free (buf);
}
return TRUE;
......
......@@ -170,7 +170,8 @@ process (GeglOperation *operation,
cairo_translate (cr, -result->x, -result->y);
text_layout_text (self, cr, 0, NULL, NULL);
gegl_buffer_set (output, NULL, babl_format ("B'aG'aR'aA u8"), data);
gegl_buffer_set (output, NULL, babl_format ("B'aG'aR'aA u8"), data,
GEGL_AUTO_ROWSTRIDE);
cairo_destroy (cr);
cairo_surface_destroy (surface);
......
......@@ -55,7 +55,7 @@ process (GeglOperation *operation,
input = GEGL_BUFFER (gegl_operation_get_data (operation, context_id, "input"));
{
GeglRectangle *result = gegl_operation_result_rect (operation, context_id);
const GeglRectangle *result = gegl_operation_result_rect (operation, context_id);
GeglBuffer *temp_in;
GeglBuffer *temp;
GeglRectangle compute = gegl_operation_compute_input_request (operation, "inputt", gegl_operation_need_rect (operation, context_id));
......@@ -147,7 +147,7 @@ hor_max (GeglBuffer *src,
i);
}
gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf);
gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf, GEGL_AUTO_ROWSTRIDE);
g_free (src_buf);
g_free (dst_buf);
}
......@@ -186,7 +186,7 @@ ver_max (GeglBuffer *src,
c);
}
gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf);
gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf, GEGL_AUTO_ROWSTRIDE);
g_free (src_buf);
g_free (dst_buf);
}
......
......@@ -56,7 +56,7 @@ process (GeglOperation *operation,
input = GEGL_BUFFER (gegl_operation_get_data (operation, context_id, "input"));
{
GeglRectangle *result = gegl_operation_result_rect (operation, context_id);
const GeglRectangle *result = gegl_operation_result_rect (operation, context_id);
GeglBuffer *temp_in;
GeglBuffer *temp;
GeglRectangle compute = gegl_operation_compute_input_request (operation, "inputt", gegl_operation_need_rect (operation, context_id));
......@@ -149,7 +149,8 @@ hor_min (GeglBuffer *src,
i);
}
gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf);
gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf,
GEGL_AUTO_ROWSTRIDE);
g_free (src_buf);
g_free (dst_buf);
}
......@@ -188,7 +189,8 @@ ver_min (GeglBuffer *src,
c);
}
gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf);
gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf,
GEGL_AUTO_ROWSTRIDE);
g_free (src_buf);
g_free (dst_buf);
}
......
......@@ -57,7 +57,7 @@ process (GeglOperation *operation,
input = GEGL_BUFFER (gegl_operation_get_data (operation, context_id, "input"));
{
GeglRectangle *result = gegl_operation_result_rect (operation, context_id);
const GeglRectangle *result = gegl_operation_result_rect (operation, context_id);
GeglBuffer *temp_in;
GeglRectangle compute = gegl_operation_compute_input_request (operation, "inputt", gegl_operation_need_rect (operation, context_id));
......@@ -206,7 +206,8 @@ median (GeglBuffer *src,
dst_buf[offset*4+u] = median_pix[u];
offset++;
}
gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf);
gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf,
GEGL_AUTO_ROWSTRIDE);
g_free (src_buf);
g_free (dst_buf);
}
......
......@@ -67,7 +67,7 @@ process (GeglOperation *operation,
input = GEGL_BUFFER (gegl_operation_get_data (operation, context_id, "input"));
{
GeglRectangle *result = gegl_operation_result_rect (operation, context_id);
const GeglRectangle *result = gegl_operation_result_rect (operation, context_id);
GeglBuffer *temp_in;
GeglRectangle compute = gegl_operation_compute_input_request (operation, "inputt", gegl_operation_need_rect (operation, context_id));
......@@ -167,7 +167,7 @@ static void c2g (GeglBuffer *src,
offset+=4;
}
}
gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf);
gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf, GEGL_AUTO_ROWSTRIDE);
g_free (src_buf);
g_free (dst_buf);
......
......@@ -50,7 +50,7 @@ process (GeglOperation *operation,
input = GEGL_BUFFER (gegl_operation_get_data (operation, context_id, "input"));
{
GeglRectangle *result = gegl_operation_result_rect (operation, context_id);
const GeglRectangle *result = gegl_operation_result_rect (operation, context_id);
GeglBuffer *temp_in;
GeglRectangle compute = gegl_operation_compute_input_request (operation, "inputt", gegl_operation_need_rect (operation, context_id));
......@@ -140,7 +140,7 @@ demosaic (GeglChantOperation *op,
offset++;
}
gegl_buffer_set (dst, NULL, babl_format ("RGB float"), dst_buf);
gegl_buffer_set (dst, NULL, babl_format ("RGB float"), dst_buf, GEGL_AUTO_ROWSTRIDE);
g_free (src_buf);
g_free (dst_buf);
}
......
......@@ -57,7 +57,7 @@ process (GeglOperation *operation,
input = GEGL_BUFFER (gegl_operation_get_data (operation, context_id, "input"));
{
GeglRectangle *result = gegl_operation_result_rect (operation, context_id);
const GeglRectangle *result = gegl_operation_result_rect (operation, context_id);
GeglBuffer *temp_in;
GeglRectangle compute = gegl_operation_compute_input_request (operation, "inputt", gegl_operation_need_rect (operation, context_id));
......@@ -212,7 +212,7 @@ median (GeglBuffer *src,
dst_buf[offset*4+u] = median_pix[u];
offset++;
}
gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf);
gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf, GEGL_AUTO_ROWSTRIDE);
g_free (src_buf);
g_free (dst_buf);
}
......
......@@ -100,11 +100,11 @@ static gboolean
process (GeglOperation *operation,
gpointer context_id)
{
GeglChantOperation *self = GEGL_CHANT_OPERATION (operation);
GeglBuffer *source;
GeglBuffer *input;
GeglRectangle *requested = gegl_operation_get_requested_region (operation, context_id);
Priv *priv = init_priv (operation);
GeglChantOperation *self = GEGL_CHANT_OPERATION (operation);
GeglBuffer *source;
GeglBuffer *input;
const GeglRectangle *requested = gegl_operation_get_requested_region (operation, context_id);
Priv *priv = init_priv (operation);
input = GEGL_BUFFER (gegl_operation_get_data (operation, context_id, "input"));
......
......@@ -41,7 +41,7 @@ process (GeglOperation *operation,
GeglBuffer *output;
GeglBuffer *temp_in;
GeglBuffer *temp_aux;
GeglRectangle *result;
const GeglRectangle *result;
composer = GEGL_OPERATION_COMPOSER (operation);
......@@ -79,7 +79,8 @@ process (GeglOperation *operation,
offset+=4;
}
}
gegl_buffer_set (output, NULL, babl_format ("RGBA float"), buf);
gegl_buffer_set (output, NULL, babl_format ("RGBA float"), buf,
GEGL_AUTO_ROWSTRIDE);
g_free (buf);
g_free (bufB);
......@@ -115,9 +116,9 @@ get_defined_region (GeglOperation *operation)
}
static GeglRectangle
compute_input_request (GeglOperation *self,
const gchar *input_pad,
GeglRectangle *roi)
compute_input_request (GeglOperation *self,
const gchar *input_pad,
const GeglRectangle *roi)
{
GeglRectangle request = *roi;
......
......@@ -53,7 +53,7 @@ process (GeglOperation *operation,
input = GEGL_BUFFER (gegl_operation_get_data (operation, context_id, "input"));
{
GeglRectangle *result = gegl_operation_result_rect (operation, context_id);
const GeglRectangle *result = gegl_operation_result_rect (operation, context_id);
GeglBuffer *temp_in;
GeglRectangle compute = gegl_operation_compute_input_request (operation, "inputt", gegl_operation_need_rect (operation, context_id));
......@@ -229,7 +229,7 @@ kuwahara (GeglBuffer *src,
offset++;
}
gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf);
gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf, GEGL_AUTO_ROWSTRIDE);
g_free (src_buf);
g_free (dst_buf);
}
......
......@@ -52,7 +52,7 @@ process (GeglOperation *operation,
input = GEGL_BUFFER (gegl_operation_get_data (operation, context_id, "input"));
{
GeglRectangle *result = gegl_operation_result_rect (operation, context_id);
const GeglRectangle *result = gegl_operation_result_rect (operation, context_id);
GeglBuffer *temp_in;
GeglRectangle compute = gegl_operation_compute_input_request (operation, "inputt", gegl_operation_need_rect (operation, context_id));
......@@ -228,7 +228,7 @@ kuwahara (GeglBuffer *src,
offset++;
}
gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf);
gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf, GEGL_AUTO_ROWSTRIDE);
g_free (src_buf);
g_free (dst_buf);
}
......
......@@ -53,9 +53,9 @@ process (GeglOperation *operation,
input = GEGL_BUFFER (gegl_operation_get_data (operation, context_id, "input"));
{
GeglRectangle *result = gegl_operation_result_rect (operation, context_id);
GeglBuffer *temp_in;
GeglRectangle compute = gegl_operation_compute_input_request (operation, "inputt", gegl_operation_need_rect (operation, context_id));
const GeglRectangle *result = gegl_operation_result_rect (operation, context_id);
GeglBuffer *temp_in;
GeglRectangle compute = gegl_operation_compute_input_request (operation, "inputt", gegl_operation_need_rect (operation, context_id));
temp_in = gegl_buffer_create_sub_buffer (input, &compute);
......@@ -233,7 +233,7 @@ kuwahara (GeglBuffer *src,
offset++;
}
gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf);
gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf, GEGL_AUTO_ROWSTRIDE);
g_free (src_buf);
g_free (dst_buf);
}
......
......@@ -56,10 +56,10 @@ static gboolean
process (GeglOperation *operation,
gpointer context_id)
{
GeglChantOperation *self = GEGL_CHANT_OPERATION (operation);
GeglRectangle *result;
GeglBuffer *input,
*output;
GeglChantOperation *self = GEGL_CHANT_OPERATION (operation);
const GeglRectangle *result;
GeglBuffer *input,
*output;
gint width = MAX(MAX (self->width, self->x0), self->x1);
gint height = MAX(MAX (self->height, self->y0), self->y1);
......@@ -136,7 +136,7 @@ process (GeglOperation *operation,
cairo_line_to (cr, self->x1, self->y1);
cairo_stroke (cr);
gegl_buffer_set (output, NULL, babl_format ("B'aG'aR'aA u8"), buf);
gegl_buffer_set (output, NULL, babl_format ("B'aG'aR'aA u8"), buf, GEGL_AUTO_ROWSTRIDE);
}
gegl_operation_set_data (operation, context_id, "output", G_OBJECT (output));
......@@ -145,9 +145,9 @@ process (GeglOperation *operation,
}
static GeglRectangle
compute_input_request (GeglOperation *self,
const gchar *input_pad,
GeglRectangle *roi)
compute_input_request (GeglOperation *self,
const gchar *input_pad,
const GeglRectangle *roi)
{
return *gegl_operation_source_get_defined_region (self, "input");
}
......
......@@ -65,13 +65,13 @@ static gboolean
process (GeglOperation *operation,
gpointer context_id)
{
GeglRectangle *need;
GeglChantOperation *self = GEGL_CHANT_OPERATION (operation);
const GeglRectangle *need;
GeglChantOperation *self = GEGL_CHANT_OPERATION (operation);
GeglBuffer *output;
need = gegl_operation_get_requested_region (operation, context_id);
{
GeglRectangle *result = gegl_operation_result_rect (operation, context_id);
const GeglRectangle *result = gegl_operation_result_rect (operation, context_id);
gfloat *buf;
gint pxsize;
......@@ -103,7 +103,7 @@ process (GeglOperation *operation,
}
}
}
gegl_buffer_set (output, NULL, NULL, buf);
gegl_buffer_set (output, NULL, NULL, buf, GEGL_AUTO_ROWSTRIDE);
g_free (buf);
}
gegl_operation_set_data (operation, context_id, "output", G_OBJECT (output));
......
......@@ -62,7 +62,7 @@ process (GeglOperation *operation,
input = GEGL_BUFFER (gegl_operation_get_data (operation, context_id, "input"));
{
GeglRectangle *result = gegl_operation_result_rect (operation, context_id);
const GeglRectangle *result = gegl_operation_result_rect (operation, context_id);
GeglBuffer *temp_in;
GeglRectangle compute = gegl_operation_compute_input_request (operation, "inputt", gegl_operation_need_rect (operation, context_id));
......@@ -134,7 +134,7 @@ static void max_envelope (GeglBuffer *src,
offset+=4;
}
}
gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf);
gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf, GEGL_AUTO_ROWSTRIDE);
g_free (src_buf);
g_free (dst_buf);
}
......
......@@ -70,8 +70,8 @@ process (GeglOperation *operation,
input = GEGL_BUFFER (gegl_operation_get_data (operation, context_id, "input"));
{
GeglRectangle *result = gegl_operation_result_rect (operation, context_id);
GeglBuffer *temp_in;
const GeglRectangle *result = gegl_operation_result_rect (operation, context_id);
GeglBuffer *temp_in;
temp_in = gegl_buffer_create_sub_buffer (input, result);
output = gegl_buffer_new (result, babl_format ("RGBA float"));
......@@ -91,8 +91,8 @@ process (GeglOperation *operation,
for (c=0;c<4;c++)
acc[i*4+c]=acc[i*4+c]*dampness + buf[i*4+c]*(1.0-dampness);
}
gegl_buffer_set (p->acc, result, babl_format ("RGBA float"), acc);
gegl_buffer_set (output, result, babl_format ("RGBA float"), acc);
gegl_buffer_set (p->acc, result, babl_format ("RGBA float"), acc, GEGL_AUTO_ROWSTRIDE);
gegl_buffer_set (output, result, babl_format ("RGBA float"), acc, GEGL_AUTO_ROWSTRIDE);
g_free (buf);
g_free (acc);
}
......
......@@ -62,7 +62,7 @@ process (GeglOperation *operation,
input = GEGL_BUFFER (gegl_operation_get_data (operation, context_id, "input"));
{
GeglRectangle *result = gegl_operation_result_rect (operation, context_id);
const GeglRectangle *result = gegl_operation_result_rect (operation, context_id);
GeglBuffer *temp_in;
GeglRectangle compute = gegl_operation_compute_input_request (operation, "inputt", gegl_operation_need_rect (operation, context_id));
......@@ -134,7 +134,7 @@ static void min_envelope (GeglBuffer *src,
offset+=4;
}
}
gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf);
gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf, GEGL_AUTO_ROWSTRIDE);
g_free (src_buf);
g_free (dst_buf);
}
......
......@@ -124,7 +124,8 @@ load_buffer (GeglChantOperation *op_raw_load)
babl_component ("G"),
babl_component ("B"),