app: sprinkle level argument over process functions

This commit is contained in:
Øyvind Kolås 2012-03-25 04:51:55 +01:00 committed by Michael Natterer
parent 942ed2316b
commit c872a9368e
14 changed files with 41 additions and 32 deletions

View File

@ -710,7 +710,7 @@ generate_boundary (GeglBuffer *buffer,
threshold);
line_rect.y = start;
gegl_buffer_get (buffer, 1.0, &line_rect, format,
gegl_buffer_get (buffer, &line_rect, 1.0, format,
line_data, GEGL_AUTO_ROWSTRIDE);
find_empty_segs (region, line_data, bpp,
@ -726,7 +726,7 @@ generate_boundary (GeglBuffer *buffer,
if (scanline + 1 == end)
line_data = NULL;
else
gegl_buffer_get (buffer, 1.0, &line_rect, format,
gegl_buffer_get (buffer, &line_rect, 1.0, format,
line_data, GEGL_AUTO_ROWSTRIDE);
find_empty_segs (region, line_data, bpp,

View File

@ -202,9 +202,9 @@ gimp_buffer_get_new_preview (GimpViewable *viewable,
0, 0, NULL);
gegl_buffer_get (buffer->buffer,
NULL,
MIN ((gdouble) width / (gdouble) gimp_buffer_get_width (buffer),
(gdouble) height / (gdouble) gimp_buffer_get_height (buffer)),
NULL,
gimp_bpp_to_babl_format (gimp_buffer_get_bytes (buffer),
TRUE),
temp_buf_get_data (preview),

View File

@ -238,7 +238,7 @@ gimp_channel_combine_ellipse_rect (GimpChannel *mask,
iter = gegl_buffer_iterator_new (buffer,
GIMP_GEGL_RECT (x0, y0, width, height),
babl_format ("Y u8"), GEGL_BUFFER_READWRITE);
babl_format ("Y u8"), GEGL_BUFFER_READWRITE, 0);
roi = &iter->roi[0];
bpp = 1;
@ -464,7 +464,7 @@ gimp_channel_combine_mask (GimpChannel *mask,
rect.height = h;
iter = gegl_buffer_iterator_new (mask_buffer, &rect, babl_format ("Y u8"),
GEGL_BUFFER_READWRITE);
GEGL_BUFFER_READWRITE, 0);
rect.x -= off_x;
rect.y -= off_y;

View File

@ -1091,7 +1091,7 @@ gimp_channel_real_bounds (GimpChannel *channel,
buffer = gimp_drawable_get_buffer (GIMP_DRAWABLE (channel));
iter = gegl_buffer_iterator_new (buffer, NULL, babl_format ("Y u8"),
GEGL_BUFFER_READ);
GEGL_BUFFER_READ, 0);
roi = &iter->roi[0];
while (gegl_buffer_iterator_next (iter))
@ -1189,7 +1189,7 @@ gimp_channel_real_is_empty (GimpChannel *channel)
buffer = gimp_drawable_get_buffer (GIMP_DRAWABLE (channel));
iter = gegl_buffer_iterator_new (buffer, NULL, babl_format ("Y u8"),
GEGL_BUFFER_READ);
GEGL_BUFFER_READ, 0);
while (gegl_buffer_iterator_next (iter))
{

View File

@ -580,9 +580,9 @@ gimp_drawable_transform_buffer_rotate (GimpDrawable *drawable,
src_rect.y = orig_y + orig_height - 1 - i;
dest_rect.x = new_x + i;
gegl_buffer_get (orig_buffer, 1.0, &src_rect, NULL, buf,
gegl_buffer_get (orig_buffer, &src_rect, 1.0, NULL, buf,
GEGL_AUTO_ROWSTRIDE);
gegl_buffer_set (new_buffer, &dest_rect, NULL, buf,
gegl_buffer_set (new_buffer, &dest_rect, 0, NULL, buf,
GEGL_AUTO_ROWSTRIDE);
}
@ -608,7 +608,7 @@ gimp_drawable_transform_buffer_rotate (GimpDrawable *drawable,
src_rect.y = orig_y + orig_height - 1 - i;
dest_rect.y = new_y + i;
gegl_buffer_get (orig_buffer, 1.0, &src_rect, NULL, buf,
gegl_buffer_get (orig_buffer, &src_rect, 1.0, NULL, buf,
GEGL_AUTO_ROWSTRIDE);
for (j = 0; j < orig_width / 2; j++)
@ -624,7 +624,7 @@ gimp_drawable_transform_buffer_rotate (GimpDrawable *drawable,
}
}
gegl_buffer_set (new_buffer, &dest_rect, NULL, buf,
gegl_buffer_set (new_buffer, &dest_rect, 0, NULL, buf,
GEGL_AUTO_ROWSTRIDE);
}
@ -650,9 +650,9 @@ gimp_drawable_transform_buffer_rotate (GimpDrawable *drawable,
src_rect.x = orig_x + orig_width - 1 - i;
dest_rect.y = new_y + i;
gegl_buffer_get (orig_buffer, 1.0, &src_rect, NULL, buf,
gegl_buffer_get (orig_buffer, &src_rect, 1.0, NULL, buf,
GEGL_AUTO_ROWSTRIDE);
gegl_buffer_set (new_buffer, &dest_rect, NULL, buf,
gegl_buffer_set (new_buffer, &dest_rect, 0, NULL, buf,
GEGL_AUTO_ROWSTRIDE);
}

View File

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

View File

@ -290,7 +290,7 @@ gimp_palette_import_extract (GimpImage *image,
format = gimp_pickable_get_format (pickable);
iter = gegl_buffer_iterator_new (buffer, &rect, format,
GEGL_BUFFER_READ);
GEGL_BUFFER_READ, 0);
roi = &iter->roi[0];
bpp = babl_format_get_bytes_per_pixel (format);

View File

@ -199,8 +199,8 @@ gimp_pattern_clipboard_buffer_changed (Gimp *gimp,
pattern->mask = temp_buf_new (width, height, bytes, 0, 0, NULL);
gegl_buffer_get (gimp_buffer_get_buffer (buffer), 1.0,
GIMP_GEGL_RECT (0,0,width,height),
gegl_buffer_get (gimp_buffer_get_buffer (buffer),
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));

View File

@ -482,7 +482,7 @@ gimp_scan_convert_render_full (GimpScanConvert *sc,
bpp = babl_format_get_bytes_per_pixel (format);
iter = gegl_buffer_iterator_new (buffer, NULL, format,
GEGL_BUFFER_WRITE);
GEGL_BUFFER_WRITE, 0);
roi = &iter->roi[0];
while (gegl_buffer_iterator_next (iter))

View File

@ -189,7 +189,7 @@ gimp_gegl_create_apply_buffer_node (GeglBuffer *buffer,
gegl_node_connect_to (mask_source, "output",
opacity_node, "aux");
mode_node = gegl_node_new_child (node, NULL);
mode_node = gegl_node_new_child (node, NULL, NULL);
gimp_gegl_node_set_layer_mode (node, mode, FALSE);
gegl_node_connect_to (opacity_node, "output",

View File

@ -54,7 +54,8 @@ static gboolean gimp_operation_equalize_process (GeglOperation *operation,
void *in_buf,
void *out_buf,
glong samples,
const GeglRectangle *roi);
const GeglRectangle *roi,
gint level);
G_DEFINE_TYPE (GimpOperationEqualize, gimp_operation_equalize,
@ -202,7 +203,8 @@ gimp_operation_equalize_process (GeglOperation *operation,
void *in_buf,
void *out_buf,
glong samples,
const GeglRectangle *roi)
const GeglRectangle *roi,
gint level)
{
GimpOperationEqualize *self = GIMP_OPERATION_EQUALIZE (operation);
gfloat *src = in_buf;

View File

@ -31,13 +31,15 @@
static gboolean gimp_operation_normal_parent_process (GeglOperation *operation,
GeglOperationContext *context,
const gchar *output_prop,
const GeglRectangle *result);
const GeglRectangle *result,
gint level);
static gboolean gimp_operation_normal_mode_process (GeglOperation *operation,
void *in_buf,
void *aux_buf,
void *out_buf,
glong samples,
const GeglRectangle *roi);
const GeglRectangle *roi,
gint level);
G_DEFINE_TYPE (GimpOperationNormalMode, gimp_operation_normal_mode,
@ -71,7 +73,8 @@ static gboolean
gimp_operation_normal_parent_process (GeglOperation *operation,
GeglOperationContext *context,
const gchar *output_prop,
const GeglRectangle *result)
const GeglRectangle *result,
gint level)
{
const GeglRectangle *in_extent = NULL;
const GeglRectangle *aux_extent = NULL;
@ -109,7 +112,8 @@ gimp_operation_normal_parent_process (GeglOperation *operation,
* process function
*/
return GEGL_OPERATION_CLASS (parent_class)->process (operation, context,
output_prop, result);
output_prop, result,
level);
}
static gboolean
@ -118,7 +122,8 @@ gimp_operation_normal_mode_process (GeglOperation *operation,
void *aux_buf,
void *out_buf,
glong samples,
const GeglRectangle *roi)
const GeglRectangle *roi,
gint level)
{
GimpOperationPointLayerMode *point = GIMP_OPERATION_POINT_LAYER_MODE (operation);
gfloat *in = in_buf;

View File

@ -49,7 +49,8 @@ static gboolean gimp_operation_set_alpha_process (GeglOperation *operat
void *aux_buf,
void *out_buf,
glong samples,
const GeglRectangle *roi);
const GeglRectangle *roi,
gint level);
G_DEFINE_TYPE (GimpOperationSetAlpha, gimp_operation_set_alpha,
@ -143,7 +144,8 @@ gimp_operation_set_alpha_process (GeglOperation *operation,
void *aux_buf,
void *out_buf,
glong samples,
const GeglRectangle *roi)
const GeglRectangle *roi,
gint level)
{
GimpOperationSetAlpha *self = GIMP_OPERATION_SET_ALPHA (operation);
gfloat *src = in_buf;

View File

@ -686,7 +686,7 @@ gimp_text_layer_render_layout (GimpTextLayer *layer,
bytes = babl_format_get_bytes_per_pixel (format);
iter = gegl_buffer_iterator_new (buffer, NULL, format,
GEGL_BUFFER_WRITE);
GEGL_BUFFER_WRITE, 0);
while (gegl_buffer_iterator_next (iter))
{