[gimp/gimp-2-10] pdb: in plug_in_compat.pdb, set underlying op nodes



commit 97d6201198470ae51174317df983646b263a092b
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.
    
    (cherry picked from commit e74994feafd277555c364067b26c575130252283)

 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 2b9d3f0d22..e1cc8402b9 100644
--- a/app/pdb/plug-in-compat-cmds.c
+++ b/app/pdb/plug-in-compat-cmds.c
@@ -73,6 +73,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");
 
@@ -106,6 +108,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 f5b35e9816..1bc5515b02 100644
--- a/pdb/groups/plug_in_compat.pdb
+++ b/pdb/groups/plug_in_compat.pdb
@@ -5038,6 +5038,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");
 
@@ -5071,6 +5073,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");
 
@@ -5133,6 +5137,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]