Commit ab4b7ab3 authored by Ell's avatar Ell

app: crop input to output rect in channel ops

In gimp_gegl_apply_{border,grow,shrink,flood}(), which are used
by the corresponding channel functions, pass crop_input = TRUE to
gimp_gegl_apply_operation(), to clip the input to the output rect.

These operations process the entire input in one go, regardless of
the requested output region; however, the channel functions
calculate the output region according to the known channel bounds,
hence clipping the input to these bounds doesn't affect discard any
information, while avoiding unnecessary work.  In particular, this
makes the corresponding operations on small selections in big images
much faster.
parent e1b1611e
......@@ -463,7 +463,7 @@ gimp_gegl_apply_border (GeglBuffer *src_buffer,
}
gimp_gegl_apply_operation (src_buffer, progress, undo_desc,
node, dest_buffer, dest_rect, FALSE);
node, dest_buffer, dest_rect, TRUE);
g_object_unref (node);
}
......@@ -489,7 +489,7 @@ gimp_gegl_apply_grow (GeglBuffer *src_buffer,
NULL);
gimp_gegl_apply_operation (src_buffer, progress, undo_desc,
node, dest_buffer, dest_rect, FALSE);
node, dest_buffer, dest_rect, TRUE);
g_object_unref (node);
}
......@@ -517,7 +517,7 @@ gimp_gegl_apply_shrink (GeglBuffer *src_buffer,
NULL);
gimp_gegl_apply_operation (src_buffer, progress, undo_desc,
node, dest_buffer, dest_rect, FALSE);
node, dest_buffer, dest_rect, TRUE);
g_object_unref (node);
}
......@@ -539,7 +539,7 @@ gimp_gegl_apply_flood (GeglBuffer *src_buffer,
NULL);
gimp_gegl_apply_operation (src_buffer, progress, undo_desc,
node, dest_buffer, dest_rect, FALSE);
node, dest_buffer, dest_rect, TRUE);
g_object_unref (node);
}
......
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