From 42ba02bcd6957da4fa08eb10edebf4326dd40026 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Sat, 31 May 2014 22:32:10 +0200 Subject: [PATCH] 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. --- app/core/gimpdrawable-filter.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/app/core/gimpdrawable-filter.c b/app/core/gimpdrawable-filter.c index e5362f2fef..9f485a9e95 100644 --- a/app/core/gimpdrawable-filter.c +++ b/app/core/gimpdrawable-filter.c @@ -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);