[gimp] app: crop input to output rect in channel ops
- From: N/A <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: crop input to output rect in channel ops
- Date: Thu, 22 Mar 2018 17:47:39 +0000 (UTC)
commit ab4b7ab33a12d72f7abfdd04ba84ed6790c8f0b9
Author: Ell <ell_se yahoo com>
Date: Thu Mar 22 13:38:11 2018 -0400
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.
app/gegl/gimp-gegl-apply-operation.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/app/gegl/gimp-gegl-apply-operation.c b/app/gegl/gimp-gegl-apply-operation.c
index f560728..12375a2 100644
--- a/app/gegl/gimp-gegl-apply-operation.c
+++ b/app/gegl/gimp-gegl-apply-operation.c
@@ -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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]