app: remove "gboolean linear" from all apply_operation APIs

thes were all unused and we want to get rid of that anyway.
This commit is contained in:
Michael Natterer 2012-03-25 23:10:30 +02:00
parent cbb2766f07
commit be853cd239
19 changed files with 60 additions and 62 deletions

View File

@ -89,7 +89,7 @@ drawable_invert_cmd_callback (GtkAction *action,
gimp_drawable_apply_operation_by_name (drawable, GIMP_PROGRESS (display),
_("Invert"), "gegl:invert",
NULL, TRUE);
NULL);
gimp_image_flush (image);
}

View File

@ -37,7 +37,6 @@ gimp_apply_operation (GeglBuffer *src_buffer,
GimpProgress *progress,
const gchar *undo_desc,
GeglNode *operation,
gboolean linear,
GeglBuffer *dest_buffer,
const GeglRectangle *dest_rect)
{

View File

@ -28,7 +28,6 @@ void gimp_apply_operation (GeglBuffer *src_buffer,
GimpProgress *progress,
const gchar *undo_desc,
GeglNode *operation,
gboolean linear,
GeglBuffer *dest_buffer,
const GeglRectangle *dest_rect);

View File

@ -477,7 +477,7 @@ gimp_channel_convert (GimpItem *item,
flatten = gimp_gegl_create_flatten_node (&background);
gimp_drawable_apply_operation_to_buffer (drawable, NULL, NULL,
flatten, TRUE, new_buffer);
flatten, new_buffer);
g_object_unref (flatten);
@ -1254,7 +1254,7 @@ gimp_channel_real_feather (GimpChannel *channel,
NULL);
gimp_drawable_apply_operation_to_buffer (drawable, NULL, NULL,
node, TRUE,
node,
gimp_drawable_get_buffer (drawable));
g_object_unref (node);
@ -1285,7 +1285,7 @@ gimp_channel_real_sharpen (GimpChannel *channel,
NULL);
gimp_drawable_apply_operation_to_buffer (drawable, NULL, NULL,
node, TRUE,
node,
gimp_drawable_get_buffer (drawable));
g_object_unref (node);
@ -1394,7 +1394,7 @@ gimp_channel_real_invert (GimpChannel *channel,
NULL);
gimp_drawable_apply_operation_to_buffer (drawable, NULL, NULL,
node, TRUE,
node,
gimp_drawable_get_buffer (drawable));
g_object_unref (node);
@ -1588,7 +1588,7 @@ gimp_channel_real_shrink (GimpChannel *channel,
gimp_apply_operation (gimp_drawable_get_buffer (GIMP_DRAWABLE (channel)),
NULL, NULL,
shrink, TRUE,
shrink,
gimp_drawable_get_buffer (GIMP_DRAWABLE (channel)),
NULL);

View File

@ -251,7 +251,7 @@ gimp_drawable_bucket_fill_internal (GimpDrawable *drawable,
1.0);
gimp_apply_operation (buffer, NULL, NULL,
apply_opacity, TRUE,
apply_opacity,
buffer, NULL);
g_object_unref (apply_opacity);

View File

@ -76,8 +76,9 @@ gimp_drawable_color_balance (GimpDrawable *drawable,
"config", config,
NULL);
gimp_drawable_apply_operation (drawable, progress, C_("undo-type", "Color Balance"),
node, TRUE);
gimp_drawable_apply_operation (drawable, progress,
C_("undo-type", "Color Balance"),
node);
g_object_unref (node);
}
else

View File

@ -50,7 +50,7 @@ gimp_drawable_equalize (GimpDrawable *drawable,
gimp_drawable_apply_operation (drawable, NULL,
C_("undo-type", "Equalize"),
equalize, TRUE);
equalize);
g_object_unref (equalize);

View File

@ -75,7 +75,7 @@ gimp_drawable_hue_saturation (GimpDrawable *drawable,
NULL);
gimp_drawable_apply_operation (drawable, progress, _("Hue-Saturation"),
node, TRUE);
node);
g_object_unref (node);
}
else

View File

@ -70,7 +70,7 @@ gimp_drawable_levels_stretch (GimpDrawable *drawable,
NULL);
gimp_drawable_apply_operation (drawable, progress, _("Levels"),
levels, TRUE);
levels);
g_object_unref (levels);
g_object_unref (config);

View File

@ -42,8 +42,7 @@ void
gimp_drawable_apply_operation (GimpDrawable *drawable,
GimpProgress *progress,
const gchar *undo_desc,
GeglNode *operation,
gboolean linear)
GeglNode *operation)
{
GeglBuffer *dest_buffer;
GeglRectangle rect;
@ -63,7 +62,7 @@ gimp_drawable_apply_operation (GimpDrawable *drawable,
gimp_apply_operation (gimp_drawable_get_buffer (drawable),
progress, undo_desc,
operation, linear,
operation,
dest_buffer, &rect);
gimp_drawable_merge_shadow_buffer (drawable, TRUE, undo_desc);
@ -80,8 +79,7 @@ gimp_drawable_apply_operation_by_name (GimpDrawable *drawable,
GimpProgress *progress,
const gchar *undo_desc,
const gchar *operation_type,
GObject *config,
gboolean linear)
GObject *config)
{
GeglNode *node;
@ -101,8 +99,7 @@ gimp_drawable_apply_operation_by_name (GimpDrawable *drawable,
"config", config,
NULL);
gimp_drawable_apply_operation (drawable, progress, undo_desc,
node, TRUE);
gimp_drawable_apply_operation (drawable, progress, undo_desc, node);
g_object_unref (node);
}
@ -112,7 +109,6 @@ gimp_drawable_apply_operation_to_buffer (GimpDrawable *drawable,
GimpProgress *progress,
const gchar *undo_desc,
GeglNode *operation,
gboolean linear,
GeglBuffer *dest_buffer)
{
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
@ -123,6 +119,6 @@ gimp_drawable_apply_operation_to_buffer (GimpDrawable *drawable,
gimp_apply_operation (gimp_drawable_get_buffer (drawable),
progress, undo_desc,
operation, linear,
operation,
dest_buffer, NULL);
}

View File

@ -27,20 +27,17 @@
void gimp_drawable_apply_operation (GimpDrawable *drawable,
GimpProgress *progress,
const gchar *undo_desc,
GeglNode *operation,
gboolean linear);
GeglNode *operation);
void gimp_drawable_apply_operation_by_name (GimpDrawable *drawable,
GimpProgress *progress,
const gchar *undo_desc,
const gchar *operation_type,
GObject *config,
gboolean linear);
GObject *config);
void gimp_drawable_apply_operation_to_buffer (GimpDrawable *drawable,
GimpProgress *progress,
const gchar *undo_desc,
GeglNode *operation,
gboolean linear,
GeglBuffer *dest_buffer);

View File

@ -383,7 +383,7 @@ gimp_drawable_stroke_scan_convert (GimpDrawable *drawable,
apply_opacity = gimp_gegl_create_apply_opacity_node (mask_buffer, 0, 0, 1.0);
gimp_apply_operation (base_buffer, NULL, NULL,
apply_opacity, 1.0,
apply_opacity,
base_buffer, NULL);
g_object_unref (apply_opacity);

View File

@ -152,7 +152,7 @@ gimp_drawable_transform_buffer_affine (GimpDrawable *drawable,
g_free (matrix_string);
gimp_apply_operation (orig_buffer, progress, NULL,
affine, TRUE,
affine,
new_buffer, NULL);
g_object_unref (affine);

View File

@ -471,7 +471,7 @@ gimp_drawable_scale (GimpItem *item,
gimp_drawable_apply_operation_to_buffer (drawable, progress,
C_("undo-type", "Scale"),
scale, TRUE, new_buffer);
scale, new_buffer);
g_object_unref (scale);
}
else

View File

@ -1330,7 +1330,7 @@ gimp_layer_create_mask (const GimpLayer *layer,
gimp_apply_operation (gimp_drawable_get_buffer (drawable),
NULL, NULL,
set_alpha, TRUE,
set_alpha,
gimp_drawable_get_buffer (drawable),
NULL);
@ -1428,9 +1428,8 @@ gimp_layer_create_mask (const GimpLayer *layer,
gimp_rgba_set (&background, 0.0, 0.0, 0.0, 0.0);
flatten = gimp_gegl_create_flatten_node (&background);
gimp_apply_operation (src_buffer,
NULL, NULL,
flatten, TRUE,
gimp_apply_operation (src_buffer, NULL, NULL,
flatten,
dest_buffer, NULL);
g_object_unref (flatten);
@ -1527,7 +1526,7 @@ gimp_layer_apply_mask (GimpLayer *layer,
1.0);
gimp_drawable_apply_operation_to_buffer (GIMP_DRAWABLE (layer), NULL, NULL,
apply_opacity, TRUE, dest_buffer);
apply_opacity, dest_buffer);
g_object_unref (apply_opacity);
}
@ -1780,7 +1779,7 @@ gimp_layer_flatten (GimpLayer *layer,
flatten = gimp_gegl_create_flatten_node (&background);
gimp_drawable_apply_operation_to_buffer (GIMP_DRAWABLE (layer), NULL, NULL,
flatten, TRUE, new_buffer);
flatten, new_buffer);
g_object_unref (flatten);

View File

@ -738,7 +738,7 @@ gimp_selection_extract (GimpSelection *selection,
1.0);
gimp_apply_operation (dest_buffer, NULL, NULL,
apply_opacity, TRUE,
apply_opacity,
dest_buffer, NULL);
g_object_unref (apply_opacity);

View File

@ -244,7 +244,9 @@ gimp_operation_shrink_process (GeglOperation *operation,
const GeglRectangle *roi,
gint level)
{
GimpOperationShrink *self = GIMP_OPERATION_SHRINK (operation);
GimpOperationShrink *self = GIMP_OPERATION_SHRINK (operation);
const Babl *input_format = babl_format ("Y u8");
const Babl *output_format = babl_format ("Y u8");
/*
pretty much the same as fatten_region only different
blame all bugs in this function on jaycox@gimp.org
@ -263,6 +265,8 @@ gimp_operation_shrink_process (GeglOperation *operation,
guchar *buffer;
gint buffer_size;
g_printerr ("roi: %d %d %d %d\n", roi->x, roi->y, roi->width, roi->height);
max = g_new (guchar *, roi->width + 2 * self->radius_x);
buf = g_new (guchar *, self->radius_y + 1);
@ -320,7 +324,8 @@ gimp_operation_shrink_process (GeglOperation *operation,
gegl_buffer_get (input,
GIMP_GEGL_RECT (roi->x, roi->y + i,
roi->width, 1),
1.0, NULL, buf[i + 1], GEGL_AUTO_ROWSTRIDE);
1.0, input_format, buf[i + 1],
GEGL_AUTO_ROWSTRIDE);
if (self->edge_lock)
memcpy (buf[0], buf[1], roi->width);
@ -344,7 +349,8 @@ gimp_operation_shrink_process (GeglOperation *operation,
gegl_buffer_get (input,
GIMP_GEGL_RECT (roi->x, roi->y + y + self->radius_y,
roi->width, 1),
1.0, NULL, buf[self->radius_y], GEGL_AUTO_ROWSTRIDE);
1.0, input_format, buf[self->radius_y],
GEGL_AUTO_ROWSTRIDE);
else if (self->edge_lock)
memcpy (buf[self->radius_y], buf[self->radius_y - 1], roi->width);
else
@ -404,7 +410,8 @@ gimp_operation_shrink_process (GeglOperation *operation,
gegl_buffer_set (output,
GIMP_GEGL_RECT (roi->x, roi->y + y,
roi->width, 1),
1.0, NULL, out, GEGL_AUTO_ROWSTRIDE);
1.0, output_format, out,
GEGL_AUTO_ROWSTRIDE);
}
/* undo the offsets to the pointers so we can free the malloced memmory */

View File

@ -78,7 +78,7 @@ brightness_contrast_invoker (GimpProcedure *procedure,
gimp_drawable_apply_operation_by_name (drawable, progress,
C_("undo-type", "Brightness-Contrast"),
"gimp:brightness-contrast",
config, TRUE);
config);
g_object_unref (config);
}
@ -138,7 +138,7 @@ levels_invoker (GimpProcedure *procedure,
gimp_drawable_apply_operation_by_name (drawable, progress,
C_("undo-type", "Levels"),
"gimp:levels",
config, TRUE);
config);
g_object_unref (config);
}
@ -233,7 +233,7 @@ posterize_invoker (GimpProcedure *procedure,
gimp_drawable_apply_operation_by_name (drawable, progress,
_("Posterize"),
"gimp:posterize",
config, TRUE);
config);
g_object_unref (config);
}
@ -271,7 +271,7 @@ desaturate_invoker (GimpProcedure *procedure,
gimp_drawable_apply_operation_by_name (drawable, progress,
_("Desaturate"),
"gimp:desaturate",
config, TRUE);
config);
g_object_unref (config);
}
@ -311,7 +311,7 @@ desaturate_full_invoker (GimpProcedure *procedure,
gimp_drawable_apply_operation_by_name (drawable, progress,
_("Desaturate"),
"gimp:desaturate",
config, TRUE);
config);
g_object_unref (config);
}
@ -375,7 +375,7 @@ invert_invoker (GimpProcedure *procedure,
gimp_drawable_apply_operation_by_name (drawable, progress,
_("Invert"),
"gegl:invert",
NULL, TRUE);
NULL);
}
else
success = FALSE;
@ -420,7 +420,7 @@ curves_spline_invoker (GimpProcedure *procedure,
gimp_drawable_apply_operation_by_name (drawable, progress,
C_("undo-type", "Curves"),
"gimp:curves",
config, TRUE);
config);
g_object_unref (config);
}
@ -467,7 +467,7 @@ curves_explicit_invoker (GimpProcedure *procedure,
gimp_drawable_apply_operation_by_name (drawable, progress,
C_("undo-type", "Curves"),
"gimp:curves",
config, TRUE);
config);
g_object_unref (config);
}
@ -554,7 +554,7 @@ colorize_invoker (GimpProcedure *procedure,
gimp_drawable_apply_operation_by_name (drawable, progress,
C_("undo-type", "Colorize"),
"gimp:colorize",
config, TRUE);
config);
g_object_unref (config);
}
@ -706,7 +706,7 @@ threshold_invoker (GimpProcedure *procedure,
gimp_drawable_apply_operation_by_name (drawable, progress,
_("Threshold"),
"gimp:threshold",
config, TRUE);
config);
g_object_unref (config);
}

View File

@ -52,7 +52,7 @@ HELP
gimp_drawable_apply_operation_by_name (drawable, progress,
C_("undo-type", "Brightness-Contrast"),
"gimp:brightness-contrast",
config, TRUE);
config);
g_object_unref (config);
}
@ -124,7 +124,7 @@ HELP
gimp_drawable_apply_operation_by_name (drawable, progress,
C_("undo-type", "Levels"),
"gimp:levels",
config, TRUE);
config);
g_object_unref (config);
}
@ -224,7 +224,7 @@ HELP
gimp_drawable_apply_operation_by_name (drawable, progress,
_("Posterize"),
"gimp:posterize",
config, TRUE);
config);
g_object_unref (config);
}
@ -265,7 +265,7 @@ HELP
gimp_drawable_apply_operation_by_name (drawable, progress,
_("Desaturate"),
"gimp:desaturate",
config, TRUE);
config);
g_object_unref (config);
}
@ -313,7 +313,7 @@ HELP
gimp_drawable_apply_operation_by_name (drawable, progress,
_("Desaturate"),
"gimp:desaturate",
config, TRUE);
config);
g_object_unref (config);
}
@ -388,7 +388,7 @@ HELP
gimp_drawable_apply_operation_by_name (drawable, progress,
_("Invert"),
"gegl:invert",
NULL, TRUE);
NULL);
}
else
success = FALSE;
@ -442,7 +442,7 @@ HELP
gimp_drawable_apply_operation_by_name (drawable, progress,
C_("undo-type", "Curves"),
"gimp:curves",
config, TRUE);
config);
g_object_unref (config);
}
@ -497,7 +497,7 @@ HELP
gimp_drawable_apply_operation_by_name (drawable, progress,
C_("undo-type", "Curves"),
"gimp:curves",
config, TRUE);
config);
g_object_unref (config);
}
@ -596,7 +596,7 @@ HELP
gimp_drawable_apply_operation_by_name (drawable, progress,
C_("undo-type", "Colorize"),
"gimp:colorize",
config, TRUE);
config);
g_object_unref (config);
}
@ -771,7 +771,7 @@ HELP
gimp_drawable_apply_operation_by_name (drawable, progress,
_("Threshold"),
"gimp:threshold",
config, TRUE);
config);
g_object_unref (config);
}