Revert "core: speed up gimp_image_contiguous_region_by_seed using a temporary GeglBuffer"

This reverts commit c204b0ac41, it's
a nice speedup we should keep, but we can't return a GimpChannel
of != image precision from that function. Needs more thinking.
This commit is contained in:
Michael Natterer 2013-04-08 02:34:56 +02:00
parent c204b0ac41
commit d53deda61b
1 changed files with 4 additions and 12 deletions

View File

@ -113,10 +113,11 @@ gimp_image_contiguous_region_by_seed (GimpImage *image,
src_buffer = gimp_pickable_get_buffer (pickable);
mask_buffer = gegl_buffer_new (gegl_buffer_get_extent (src_buffer),
babl_format ("Y float"));
mask = gimp_channel_new_mask (image,
gegl_buffer_get_width (src_buffer),
gegl_buffer_get_height (src_buffer));
gegl_buffer_clear (mask_buffer, NULL);
mask_buffer = gimp_drawable_get_buffer (GIMP_DRAWABLE (mask));
gegl_buffer_sample (src_buffer, x, y, NULL, start_col, src_format,
GEGL_SAMPLER_NEAREST, GEGL_ABYSS_NONE);
@ -144,15 +145,6 @@ gimp_image_contiguous_region_by_seed (GimpImage *image,
antialias, threshold,
x, y, start_col);
/* wrap mask_buffer in a drawable and return it */
mask = gimp_channel_new_mask (image,
gegl_buffer_get_width (mask_buffer),
gegl_buffer_get_height (mask_buffer));
gimp_drawable_set_buffer (GIMP_DRAWABLE (mask), FALSE, "", mask_buffer);
g_object_unref (mask_buffer);
return mask;
}