[gimp/gimp-2-10] app: directly update the mask buffer with gegl_node_blit_buffer().
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-10] app: directly update the mask buffer with gegl_node_blit_buffer().
- Date: Wed, 19 Dec 2018 15:42:43 +0000 (UTC)
commit 8557cd8cfbaacaddbfff88cb8a8640da5f03f07d
Author: Jehan <jehan girinstud io>
Date: Fri Oct 26 14:57:55 2018 +0200
app: directly update the mask buffer with gegl_node_blit_buffer().
No need to create a temporary buffer for this.
(cherry picked from commit f02993fb9cd6a4e26251676b1e0b110276f4282e)
app/core/gimppickable-contiguous-region.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
---
diff --git a/app/core/gimppickable-contiguous-region.c b/app/core/gimppickable-contiguous-region.c
index 5effb026d6..d12878e631 100644
--- a/app/core/gimppickable-contiguous-region.c
+++ b/app/core/gimppickable-contiguous-region.c
@@ -227,12 +227,10 @@ gimp_pickable_contiguous_region_by_seed (GimpPickable *pickable,
*/
GeglBufferIterator *gi;
GeglBuffer *priomap;
- GeglBuffer *tmp;
GeglNode *graph;
GeglNode *input;
GeglNode *aux;
GeglNode *op;
- GeglNode *sink;
GIMP_TIMER_START();
@@ -290,23 +288,14 @@ gimp_pickable_contiguous_region_by_seed (GimpPickable *pickable,
"flag-component", 0,
"flag", &flag,
NULL);
- sink = gegl_node_new_child (graph,
- "operation", "gegl:buffer-sink",
- "buffer", &tmp,
- NULL);
gegl_node_connect_to (input, "output",
op, "input");
gegl_node_connect_to (aux, "output",
op, "aux");
- gegl_node_connect_to (op, "output",
- sink, "input");
- gegl_node_process (sink);
+ gegl_node_blit_buffer (op, mask_buffer, NULL, 0, GEGL_ABYSS_NONE);
g_object_unref (graph);
g_object_unref (priomap);
- gegl_buffer_copy (tmp, NULL, GEGL_ABYSS_NONE, mask_buffer, NULL);
- g_object_unref (tmp);
-
GIMP_TIMER_END("watershed line art");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]