Commit 66bb469a authored by Ell's avatar Ell

Bug 786992 - removing alpha produces a black image (sometimes), with OpenCL

When creating a flatten node, which is used when removing alpha
channels and when flattening an image, use a gimp:normal node to
combine the layer with the background color, instead of a gegl:over
node.  gegl:over can apparently result in completely black output
with OpenCL enabled, under certain (not fully pinned-down)

As long as the OpenCL version of gegl:over is borked, there is not
much reason to use it over gimp:normal, which is more consistent
(in intension, if not in extension) with the rest of the
compositing pipeline.
parent 0c305bdb
......@@ -38,7 +38,7 @@ gimp_gegl_create_flatten_node (const GimpRGB *background,
GeglNode *input;
GeglNode *output;
GeglNode *color;
GeglNode *over;
GeglNode *mode;
GeglColor *c;
g_return_val_if_fail (background != NULL, NULL);
......@@ -58,17 +58,20 @@ gimp_gegl_create_flatten_node (const GimpRGB *background,
g_object_unref (c);
over = gegl_node_new_child (node,
"operation", "gegl:over",
"srgb", composite_space ==
mode = gegl_node_new_child (node,
"operation", "gimp:normal",
gimp_gegl_mode_node_set_mode (mode,
gegl_node_connect_to (input, "output",
over, "aux");
mode, "aux");
gegl_node_connect_to (color, "output",
over, "input");
gegl_node_connect_to (over, "output",
mode, "input");
gegl_node_connect_to (mode, "output",
output, "input");
return node;
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