app: don't duplicate code in gimp_drawable_merge_filter()

gimp_gegl_apply_operation() already takes care of the
src_buffer == dest_buffer special case.
This commit is contained in:
Michael Natterer 2014-05-31 22:32:10 +02:00
parent 49818c7179
commit 42ba02bcd6
1 changed files with 1 additions and 20 deletions

View File

@ -97,9 +97,7 @@ gimp_drawable_merge_filter (GimpDrawable *drawable,
&rect.width, &rect.height))
{
GimpApplicator *applicator;
GeglBuffer *buffer;
GeglNode *node;
GeglNode *src_node;
gimp_drawable_push_undo (drawable, undo_desc, NULL,
rect.x, rect.y,
@ -107,21 +105,6 @@ gimp_drawable_merge_filter (GimpDrawable *drawable,
node = gimp_filter_get_node (filter);
/* dup() because reading and writing the same buffer doesn't
* work with area ops when using a processor. See bug #701875.
*/
buffer = gegl_buffer_dup (gimp_drawable_get_buffer (drawable));
src_node = gegl_node_new_child (NULL,
"operation", "gegl:buffer-source",
"buffer", buffer,
NULL);
g_object_unref (buffer);
gegl_node_connect_to (src_node, "output",
node, "input");
applicator = gimp_filter_get_applicator (filter);
/* FIXME: disabled because it is unacceptable to run the
@ -144,14 +127,12 @@ gimp_drawable_merge_filter (GimpDrawable *drawable,
}
}
gimp_gegl_apply_operation (NULL,
gimp_gegl_apply_operation (gimp_drawable_get_buffer (drawable),
progress, undo_desc,
node,
gimp_drawable_get_buffer (drawable),
&rect);
g_object_unref (src_node);
gimp_drawable_update (drawable,
rect.x, rect.y,
rect.width, rect.height);