app: implement pass-through mode in GimpGroupLayer

Desktop / GNOME / GIMP - Ell [] - 8 August 2017 15:39 EDT

Override GimpDrawable::get_source_node() for GimpGroupLayer. Use a node that contains both the drawable's buffer-source node, and the layer stack's graph node. Choose which one of these to connect to the source node's output based on the group's layer mode: the stack graph for pass-through mode, and the buffer-source node for all the rest.

When in pass-through mode, connect the source node's input (which receives the backdrop) to the stack graph's input. Keep maintaining the projection in pass-through mode. ATM, the projection uses the same graph as the source node, so it's rendered against the group's backdrop -- we don't want that. The next few commits fix it.

Update the group's drawable directly upon filter stack update in pass-though mode, because the group's graph doesn't go through the projection.

TODO: if any of the group's children (or a child of a nested pass-through group, etc.) uses dst-atop/src-in, this needs special attention.

10371ec app: implement pass-through mode in GimpGroupLayer
app/core/gimpgrouplayer.c | 118 +++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 111 insertions(+), 7 deletions(-)


  • Share