app: adapt to API changes in GEGL

This commit is contained in:
Øyvind Kolås 2012-03-26 01:17:24 +01:00 committed by Michael Natterer
parent 2b6b5a8ada
commit f68c3c7051
13 changed files with 36 additions and 27 deletions

View File

@ -711,7 +711,8 @@ generate_boundary (GeglBuffer *buffer,
line_rect.y = start;
gegl_buffer_get (buffer, &line_rect, 1.0, format,
line_data, GEGL_AUTO_ROWSTRIDE);
line_data, GEGL_AUTO_ROWSTRIDE,
GEGL_ABYSS_NONE);
find_empty_segs (region, line_data, bpp,
start, boundary->empty_segs_c,
@ -727,7 +728,8 @@ generate_boundary (GeglBuffer *buffer,
line_data = NULL;
else
gegl_buffer_get (buffer, &line_rect, 1.0, format,
line_data, GEGL_AUTO_ROWSTRIDE);
line_data, GEGL_AUTO_ROWSTRIDE,
GEGL_ABYSS_NONE);
find_empty_segs (region, line_data, bpp,
scanline + 1, boundary->empty_segs_n,

View File

@ -208,7 +208,8 @@ gimp_buffer_get_new_preview (GimpViewable *viewable,
gimp_bpp_to_babl_format (gimp_buffer_get_bytes (buffer),
TRUE),
temp_buf_get_data (preview),
width * gimp_buffer_get_bytes (buffer));
width * gimp_buffer_get_bytes (buffer),
GEGL_ABYSS_NONE);
return preview;
}

View File

@ -977,7 +977,7 @@ gimp_channel_get_opacity_at (GimpPickable *pickable,
gegl_buffer_sample (gimp_drawable_get_buffer (GIMP_DRAWABLE (channel)),
x, y, NULL, &value, babl_format ("Y u8"),
GEGL_SAMPLER_NEAREST);
GEGL_SAMPLER_NEAREST, GEGL_ABYSS_NONE);
return value;
}

View File

@ -581,7 +581,7 @@ gimp_drawable_transform_buffer_rotate (GimpDrawable *drawable,
dest_rect.x = new_x + i;
gegl_buffer_get (orig_buffer, &src_rect, 1.0, NULL, buf,
GEGL_AUTO_ROWSTRIDE);
GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
gegl_buffer_set (new_buffer, &dest_rect, 0, NULL, buf,
GEGL_AUTO_ROWSTRIDE);
}
@ -609,7 +609,7 @@ gimp_drawable_transform_buffer_rotate (GimpDrawable *drawable,
dest_rect.y = new_y + i;
gegl_buffer_get (orig_buffer, &src_rect, 1.0, NULL, buf,
GEGL_AUTO_ROWSTRIDE);
GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
for (j = 0; j < orig_width / 2; j++)
{
@ -651,7 +651,7 @@ gimp_drawable_transform_buffer_rotate (GimpDrawable *drawable,
dest_rect.y = new_y + i;
gegl_buffer_get (orig_buffer, &src_rect, 1.0, NULL, buf,
GEGL_AUTO_ROWSTRIDE);
GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
gegl_buffer_set (new_buffer, &dest_rect, 0, NULL, buf,
GEGL_AUTO_ROWSTRIDE);
}

View File

@ -704,7 +704,7 @@ gimp_drawable_get_pixel_at (GimpPickable *pickable,
gegl_buffer_sample (gimp_drawable_get_buffer (drawable),
x, y, NULL, pixel,
gimp_drawable_get_format (drawable),
GEGL_SAMPLER_NEAREST);
GEGL_SAMPLER_NEAREST, GEGL_ABYSS_NONE);
return TRUE;
}

View File

@ -389,7 +389,8 @@ gimp_image_crop_auto_shrink (GimpImage *image,
for (y = y1; y < y2 && !abort; y++)
{
rect.y = y;
gegl_buffer_get (buffer, &rect, 1.0, NULL, buf, GEGL_AUTO_ROWSTRIDE);
gegl_buffer_get (buffer, &rect, 1.0, NULL, buf,
GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
for (x = 0; x < width && !abort; x++)
abort = !(colors_equal_func) (bgcolor, buf + x * bytes, bytes);
}
@ -407,7 +408,8 @@ gimp_image_crop_auto_shrink (GimpImage *image,
for (y = y2; y > y1 && !abort; y--)
{
rect.y = y - 1;
gegl_buffer_get (buffer, &rect, 1.0, NULL, buf, GEGL_AUTO_ROWSTRIDE);
gegl_buffer_get (buffer, &rect, 1.0, NULL, buf,
GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
for (x = 0; x < width && !abort; x++)
abort = !(colors_equal_func) (bgcolor, buf + x * bytes, bytes);
}
@ -426,7 +428,8 @@ gimp_image_crop_auto_shrink (GimpImage *image,
for (x = x1; x < x2 && !abort; x++)
{
rect.x = x;
gegl_buffer_get (buffer, &rect, 1.0, NULL, buf, GEGL_AUTO_ROWSTRIDE);
gegl_buffer_get (buffer, &rect, 1.0, NULL, buf,
GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
for (y = 0; y < height && !abort; y++)
abort = !(colors_equal_func) (bgcolor, buf + y * bytes, bytes);
}
@ -442,7 +445,8 @@ gimp_image_crop_auto_shrink (GimpImage *image,
for (x = x2; x > x1 && !abort; x--)
{
rect.x = x - 1;
gegl_buffer_get (buffer, &rect, 1.0, NULL, buf, GEGL_AUTO_ROWSTRIDE);
gegl_buffer_get (buffer, &rect, 1.0, NULL, buf,
GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
for (y = 0; y < height && !abort; y++)
abort = !(colors_equal_func) (bgcolor, buf + y * bytes, bytes);
}

View File

@ -341,7 +341,8 @@ gimp_image_map_get_pixel_at (GimpPickable *pickable,
x - offset_x, y - offset_y,
NULL, pixel,
gimp_drawable_get_format (image_map->drawable),
GEGL_SAMPLER_NEAREST);
GEGL_SAMPLER_NEAREST,
GEGL_ABYSS_NONE);
return TRUE;
}

View File

@ -990,7 +990,7 @@ gimp_layer_get_opacity_at (GimpPickable *pickable,
*/
gegl_buffer_sample (gimp_drawable_get_buffer (GIMP_DRAWABLE (layer)),
x, y, NULL, &value, babl_format ("A u8"),
GEGL_SAMPLER_NEAREST);
GEGL_SAMPLER_NEAREST, GEGL_ABYSS_NONE);
if (layer->mask)
{

View File

@ -203,7 +203,8 @@ gimp_pattern_clipboard_buffer_changed (Gimp *gimp,
GIMP_GEGL_RECT (0,0,width,height), 1.0,
gimp_bpp_to_babl_format (bytes, TRUE),
temp_buf_get_data (pattern->mask),
width * gimp_buffer_get_bytes (buffer));
width * gimp_buffer_get_bytes (buffer),
GEGL_ABYSS_NONE);
}
else
{

View File

@ -386,7 +386,7 @@ gimp_projection_get_pixel_at (GimpPickable *pickable,
gegl_buffer_sample (buffer, x, y, NULL, pixel,
gimp_projection_get_format (pickable),
GEGL_SAMPLER_NEAREST);
GEGL_SAMPLER_NEAREST, GEGL_ABYSS_NONE);
return TRUE;
}

View File

@ -381,14 +381,14 @@ gimp_operation_border_process (GeglOperation *operation,
GIMP_GEGL_RECT (roi->x, roi->y + 0,
roi->width, 1),
1.0, input_format, source[1],
GEGL_AUTO_ROWSTRIDE);
GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
if (roi->height > 1)
gegl_buffer_get (input,
GIMP_GEGL_RECT (roi->x, roi->y + 1,
roi->width, 1),
1.0, input_format, source[2],
GEGL_AUTO_ROWSTRIDE);
GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
else
memcpy (source[2], source[1], roi->width);
@ -409,7 +409,7 @@ gimp_operation_border_process (GeglOperation *operation,
GIMP_GEGL_RECT (roi->x, roi->y + y + 1,
roi->width, 1),
1.0, input_format, source[2],
GEGL_AUTO_ROWSTRIDE);
GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
}
else
{
@ -523,14 +523,14 @@ gimp_operation_border_process (GeglOperation *operation,
GIMP_GEGL_RECT (roi->x, roi->y + 0,
roi->width, 1),
1.0, input_format, buf[1],
GEGL_AUTO_ROWSTRIDE);
GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
if (roi->height > 1)
gegl_buffer_get (input,
GIMP_GEGL_RECT (roi->x, roi->y + 1,
roi->width, 1),
1.0, input_format, buf[2],
GEGL_AUTO_ROWSTRIDE);
GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
else
memcpy (buf[2], buf[1], roi->width);
@ -544,7 +544,7 @@ gimp_operation_border_process (GeglOperation *operation,
GIMP_GEGL_RECT (roi->x, roi->y + y + 1,
roi->width, 1),
1.0, input_format, buf[2],
GEGL_AUTO_ROWSTRIDE);
GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
compute_transition (transition[y + 1], buf, roi->width, self->edge_lock);
}
@ -574,7 +574,7 @@ gimp_operation_border_process (GeglOperation *operation,
roi->y + y + self->radius_y + 1,
roi->width, 1),
1.0, input_format, buf[2],
GEGL_AUTO_ROWSTRIDE);
GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
compute_transition (transition[self->radius_y], buf, roi->width, self->edge_lock);
}
else

View File

@ -284,7 +284,7 @@ gimp_operation_grow_process (GeglOperation *operation,
GIMP_GEGL_RECT (roi->x, roi->y + i,
roi->width, 1),
1.0, input_format, buf[i + 1],
GEGL_AUTO_ROWSTRIDE);
GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
for (x = 0; x < roi->width; x++) /* set up max for top of image */
{
@ -304,7 +304,7 @@ gimp_operation_grow_process (GeglOperation *operation,
GIMP_GEGL_RECT (roi->x, roi->y + y + self->radius_y,
roi->width, 1),
1.0, input_format, buf[self->radius_y],
GEGL_AUTO_ROWSTRIDE);
GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
else
memset (buf[self->radius_y], 0, roi->width);

View File

@ -323,7 +323,7 @@ gimp_operation_shrink_process (GeglOperation *operation,
GIMP_GEGL_RECT (roi->x, roi->y + i,
roi->width, 1),
1.0, input_format, buf[i + 1],
GEGL_AUTO_ROWSTRIDE);
GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
if (self->edge_lock)
memcpy (buf[0], buf[1], roi->width);
@ -348,7 +348,7 @@ gimp_operation_shrink_process (GeglOperation *operation,
GIMP_GEGL_RECT (roi->x, roi->y + y + self->radius_y,
roi->width, 1),
1.0, input_format, buf[self->radius_y],
GEGL_AUTO_ROWSTRIDE);
GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
else if (self->edge_lock)
memcpy (buf[self->radius_y], buf[self->radius_y - 1], roi->width);
else