app: directly update the mask buffer with gegl_node_blit_buffer().
No need to create a temporary buffer for this.
(cherry picked from commit f02993fb9c)
This commit is contained in:
parent
8dc6bcafa3
commit
8557cd8cfb
1 changed files with 1 additions and 12 deletions
|
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue