Commit 1381a26a authored by Ell's avatar Ell

recursive-transform: cache iteration results when performing multiple transforms

In gegl:recursive-transform, cache the results of intermediate
iterations when performing multiple transforms in each iteration,
to avoid processing the same iterations multiple times when working
in chunks.
parent fe2ce4b2
......@@ -95,6 +95,10 @@ update_graph (GeglOperation *operation)
{
for (j = MAX_TRANSFORMS - 1; j >= 0; j--)
{
g_object_set (iters[i].over_nodes[j],
"cache-policy", GEGL_CACHE_POLICY_AUTO,
NULL);
gegl_node_disconnect (iters[i].over_nodes[j], "input");
gegl_node_disconnect (iters[i].over_nodes[j], "aux");
}
......@@ -276,6 +280,13 @@ update_graph (GeglOperation *operation)
gegl_node_connect_to (source_node, "output",
iters[i].over_nodes[n_transforms - 1], ! o->paste_below ? "aux" :
"input");
if (i > 0)
{
g_object_set (iters[i].over_nodes[n_transforms - 1],
"cache-policy", GEGL_CACHE_POLICY_ALWAYS,
NULL);
}
}
if (i >= o->first_iteration)
......
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