[gimp/soc-2010-cage-2] Clean up debug code



commit d2612487921420c32d189649503331b19fa2f69e
Author: Alexia Death <alexiadeath gmail com>
Date:   Sun Sep 5 12:48:23 2010 +0300

    Clean up debug code

 app/tools/gimpcagetool.c |  105 +++++++++++++++-------------------------------
 1 files changed, 34 insertions(+), 71 deletions(-)
---
diff --git a/app/tools/gimpcagetool.c b/app/tools/gimpcagetool.c
index f72b9dc..2b07e28 100644
--- a/app/tools/gimpcagetool.c
+++ b/app/tools/gimpcagetool.c
@@ -737,7 +737,7 @@ gimp_cage_tool_process (GimpCageTool *ct,
   {
     GeglNode *gegl = gegl_node_new ();
 
-#if FALSE
+#ifdef DEBUG_CAGE
     /* debug coeficient */
     GeglNode *coef, *debug, *output;
 
@@ -763,88 +763,51 @@ gimp_cage_tool_process (GimpCageTool *ct,
     gegl_node_connect_to (debug, "output",
                           output, "input");
 #else
-    #if TRUE
-      /* reverse transform */
-      GeglNode *coef, *cage, *render, *input, *output;
-
-      input  = gegl_node_new_child (gegl,
-                                    "operation",    "gimp:tilemanager-source",
-                                    "tile-manager", gimp_drawable_get_tiles (drawable),
-                                    "linear",       TRUE,
-                                    NULL);
-
-      cage = gegl_node_new_child (gegl,
-                                  "operation", "gimp:cage_transform",
-                                  "config", ct->config,
-                                  "fill_plain_color", options->fill_plain_color,
-                                  NULL);
+    /* reverse transform */
+    GeglNode *coef, *cage, *render, *input, *output;
 
-      coef = gegl_node_new_child (gegl,
-                                  "operation", "gegl:buffer-source",
-                                  "buffer",    ct->coef,
+    input  = gegl_node_new_child (gegl,
+                                  "operation",    "gimp:tilemanager-source",
+                                  "tile-manager", gimp_drawable_get_tiles (drawable),
+                                  "linear",       TRUE,
                                   NULL);
 
-      render = gegl_node_new_child (gegl,
-                                    "operation", "gegl:render_mapping",
-                                    NULL);
-
-      new_tiles = gimp_drawable_get_shadow_tiles (drawable);
-      output = gegl_node_new_child (gegl,
-                                    "operation",    "gimp:tilemanager-sink",
-                                    "tile-manager", new_tiles,
-                                    "linear",       TRUE,
-                                    NULL);
-
-      gegl_node_connect_to (input, "output",
-                            cage, "input");
-
-      gegl_node_connect_to (input, "output",
-                            render, "input");
-
-      gegl_node_connect_to (coef, "output",
-                            cage, "aux");
-
-      gegl_node_connect_to (cage, "output",
-                            render, "aux");
-
-      gegl_node_connect_to (render, "output",
-                            output, "input");
-    #else
-      /* forward transform */
-      GeglNode *coef, *cage, *input, *output;
+    cage = gegl_node_new_child (gegl,
+                                "operation", "gimp:cage_transform",
+                                "config", ct->config,
+                                "fill_plain_color", options->fill_plain_color,
+                                NULL);
 
-      input  = gegl_node_new_child (gegl,
-                                    "operation",    "gimp:tilemanager-source",
-                                    "tile-manager", gimp_drawable_get_tiles (drawable),
-                                    "linear",       TRUE,
-                                    NULL);
+    coef = gegl_node_new_child (gegl,
+                                "operation", "gegl:buffer-source",
+                                "buffer",    ct->coef,
+                                NULL);
 
-      cage = gegl_node_new_child (gegl,
-                                  "operation", "gimp:cage_preview",
-                                  "config", ct->config,
+    render = gegl_node_new_child (gegl,
+                                  "operation", "gegl:render_mapping",
                                   NULL);
 
-      coef = gegl_node_new_child (gegl,
-                                  "operation", "gegl:buffer-source",
-                                  "buffer",    ct->coef,
+    new_tiles = gimp_drawable_get_shadow_tiles (drawable);
+    output = gegl_node_new_child (gegl,
+                                  "operation",    "gimp:tilemanager-sink",
+                                  "tile-manager", new_tiles,
+                                  "linear",       TRUE,
                                   NULL);
 
-      new_tiles = gimp_drawable_get_shadow_tiles (drawable);
-      output = gegl_node_new_child (gegl,
-                                    "operation",    "gimp:tilemanager-sink",
-                                    "tile-manager", new_tiles,
-                                    "linear",       TRUE,
-                                    NULL);
+    gegl_node_connect_to (input, "output",
+                          cage, "input");
 
-      gegl_node_connect_to (input, "output",
-                            cage, "input");
+    gegl_node_connect_to (input, "output",
+                          render, "input");
 
-      gegl_node_connect_to (coef, "output",
-                            cage, "aux");
+    gegl_node_connect_to (coef, "output",
+                          cage, "aux");
 
-      gegl_node_connect_to (cage, "output",
-                            output, "input");
-    #endif
+    gegl_node_connect_to (cage, "output",
+                          render, "aux");
+
+    gegl_node_connect_to (render, "output",
+                          output, "input");
 #endif
 
 



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