Commit d53deda6 authored by Michael Natterer's avatar Michael Natterer 😴

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

This reverts commit c204b0ac, it's
a nice speedup we should keep, but we can't return a GimpChannel
of != image precision from that function. Needs more thinking.
parent c204b0ac
......@@ -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,
......@@ -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;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment