Commit f02993fb authored by Jehan's avatar Jehan

app: directly update the mask buffer with gegl_node_blit_buffer().

No need to create a temporary buffer for this.
parent 410c7475
......@@ -228,12 +228,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;
......@@ -291,23 +289,14 @@ gimp_pickable_contiguous_region_by_seed (GimpPickable *pickable,
"flag-component", 0,
"flag", &flag,
sink = gegl_node_new_child (graph,
"operation", "gegl:buffer-sink",
"buffer", &tmp,
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");
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