[gimp] pdb: in plug_in_compat.pdb, set underlying op nodes



commit e74994feafd277555c364067b26c575130252283
Author: Ell <ell_se yahoo com>
Date:   Tue Jan 7 10:49:24 2020 +0200

    pdb: in plug_in_compat.pdb, set underlying op nodes
    
    In plug_in_compat.pdb, when wrapping an op node inside a graph, set
    the op node as the graph node's underlying operation.  This allows
    gimp_gegl_apply_operation() to perform certain optimizations.

 app/pdb/plug-in-compat-cmds.c | 6 ++++++
 pdb/groups/plug_in_compat.pdb | 6 ++++++
 2 files changed, 12 insertions(+)
---
diff --git a/app/pdb/plug-in-compat-cmds.c b/app/pdb/plug-in-compat-cmds.c
index 0074d361db..ebcb2326e4 100644
--- a/app/pdb/plug-in-compat-cmds.c
+++ b/app/pdb/plug-in-compat-cmds.c
@@ -72,6 +72,8 @@ wrap_in_graph (GeglNode *node)
   gegl_node_add_child (new_node, node);
   g_object_unref (node);
 
+  gimp_gegl_node_set_underlying_operation (new_node, node);
+
   input  = gegl_node_get_input_proxy  (new_node, "input");
   output = gegl_node_get_output_proxy (new_node, "output");
 
@@ -105,6 +107,8 @@ wrap_in_selection_bounds (GeglNode     *node,
       gegl_node_add_child (new_node, node);
       g_object_unref (node);
 
+      gimp_gegl_node_set_underlying_operation (new_node, node);
+
       input  = gegl_node_get_input_proxy  (new_node, "input");
       output = gegl_node_get_output_proxy (new_node, "output");
 
@@ -168,6 +172,8 @@ wrap_in_gamma_cast (GeglNode     *node,
       gegl_node_add_child (new_node, node);
       g_object_unref (node);
 
+      gimp_gegl_node_set_underlying_operation (new_node, node);
+
       input  = gegl_node_get_input_proxy  (new_node, "input");
       output = gegl_node_get_output_proxy (new_node, "output");
 
diff --git a/pdb/groups/plug_in_compat.pdb b/pdb/groups/plug_in_compat.pdb
index 9f5d9a700d..c9136b7395 100644
--- a/pdb/groups/plug_in_compat.pdb
+++ b/pdb/groups/plug_in_compat.pdb
@@ -5081,6 +5081,8 @@ wrap_in_graph (GeglNode *node)
   gegl_node_add_child (new_node, node);
   g_object_unref (node);
 
+  gimp_gegl_node_set_underlying_operation (new_node, node);
+
   input  = gegl_node_get_input_proxy  (new_node, "input");
   output = gegl_node_get_output_proxy (new_node, "output");
 
@@ -5114,6 +5116,8 @@ wrap_in_selection_bounds (GeglNode     *node,
       gegl_node_add_child (new_node, node);
       g_object_unref (node);
 
+      gimp_gegl_node_set_underlying_operation (new_node, node);
+
       input  = gegl_node_get_input_proxy  (new_node, "input");
       output = gegl_node_get_output_proxy (new_node, "output");
 
@@ -5177,6 +5181,8 @@ wrap_in_gamma_cast (GeglNode     *node,
       gegl_node_add_child (new_node, node);
       g_object_unref (node);
 
+      gimp_gegl_node_set_underlying_operation (new_node, node);
+
       input  = gegl_node_get_input_proxy  (new_node, "input");
       output = gegl_node_get_output_proxy (new_node, "output");
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]