[gimp] app: remove Debug -> Benchmark Projection



commit eec5e9968e192cdc0b03b5aba091da63455ce465
Author: Michael Natterer <mitch gimp org>
Date:   Sun May 20 20:13:59 2012 +0200

    app: remove Debug -> Benchmark Projection

 app/actions/debug-actions.c  |    7 -----
 app/actions/debug-commands.c |   51 ------------------------------------------
 menus/image-menu.xml.in      |    1 -
 3 files changed, 0 insertions(+), 59 deletions(-)
---
diff --git a/app/actions/debug-actions.c b/app/actions/debug-actions.c
index 87ce47d..6d3f1fc 100644
--- a/app/actions/debug-actions.c
+++ b/app/actions/debug-actions.c
@@ -42,13 +42,6 @@ static const GimpActionEntry debug_actions[] =
     G_CALLBACK (debug_mem_profile_cmd_callback),
     NULL },
 
-  { "debug-benchmark-projection", NULL,
-    "Benchmark _Projection", NULL,
-    "Invalidates the entire projection, measures the time it takes to "
-    "validate (render) it again, and print the result to stdout.",
-    G_CALLBACK (debug_benchmark_projection_cmd_callback),
-    NULL },
-
   { "debug-show-image-graph", NULL,
     "Show Image _Graph", NULL,
     "Creates a new image showing the GEGL graph of this image",
diff --git a/app/actions/debug-commands.c b/app/actions/debug-commands.c
index c34bc57..a7efb35 100644
--- a/app/actions/debug-commands.c
+++ b/app/actions/debug-commands.c
@@ -27,9 +27,6 @@
 
 #include "actions-types.h"
 
-#include "base/tile-manager.h"
-#include "base/tile.h"
-
 #include "core/gimp.h"
 #include "core/gimp-utils.h"
 #include "core/gimpcontext.h"
@@ -37,7 +34,6 @@
 #include "core/gimplayer.h"
 #include "core/gimppickable.h"
 #include "core/gimpprojectable.h"
-#include "core/gimpprojection.h"
 
 #include "file/file-utils.h"
 
@@ -61,7 +57,6 @@
 
 /*  local function prototypes  */
 
-static gboolean  debug_benchmark_projection    (GimpImage   *image);
 static gboolean  debug_show_image_graph        (GimpImage   *source_image);
 
 static void      debug_dump_menus_recurse_menu (GtkWidget   *menu,
@@ -96,16 +91,6 @@ debug_mem_profile_cmd_callback (GtkAction *action,
 }
 
 void
-debug_benchmark_projection_cmd_callback (GtkAction *action,
-                                         gpointer   data)
-{
-  GimpImage *image;
-  return_if_no_image (image, data);
-
-  g_idle_add ((GSourceFunc) debug_benchmark_projection, g_object_ref (image));
-}
-
-void
 debug_show_image_graph_cmd_callback (GtkAction *action,
                                      gpointer   data)
 {
@@ -288,42 +273,6 @@ debug_dump_attached_data_cmd_callback (GtkAction *action,
 /*  private functions  */
 
 static gboolean
-debug_benchmark_projection (GimpImage *image)
-{
-  GimpProjection *projection = gimp_image_get_projection (image);
-  GeglBuffer     *buffer;
-  TileManager    *tiles;
-  gint            x, y;
-
-  gimp_image_invalidate (image,
-                         0, 0,
-                         gimp_image_get_width  (image),
-                         gimp_image_get_height (image));
-  gimp_projection_flush_now (projection);
-
-  buffer = gimp_pickable_get_buffer (GIMP_PICKABLE (projection));
-  tiles = gimp_gegl_buffer_get_tiles (buffer);
-
-  GIMP_TIMER_START ();
-
-  for (x = 0; x < tile_manager_width (tiles); x += TILE_WIDTH)
-    {
-      for (y = 0; y < tile_manager_height (tiles); y += TILE_HEIGHT)
-        {
-          Tile *tile = tile_manager_get_tile (tiles, x, y, TRUE, FALSE);
-
-          tile_release (tile, FALSE);
-        }
-    }
-
-  GIMP_TIMER_END ("Validation of the entire projection");
-
-  g_object_unref (image);
-
-  return FALSE;
-}
-
-static gboolean
 debug_show_image_graph (GimpImage *source_image)
 {
   Gimp            *gimp        = source_image->gimp;
diff --git a/menus/image-menu.xml.in b/menus/image-menu.xml.in
index 8d869d2..c25af4e 100644
--- a/menus/image-menu.xml.in
+++ b/menus/image-menu.xml.in
@@ -26,7 +26,6 @@
 <!--  The debug-menu is automatically excluded for stable releases  -->
       <menu action="debug-menu" name="Debug">
         <menuitem action="debug-mem-profile" />
-        <menuitem action="debug-benchmark-projection" />
         <menuitem action="debug-show-image-graph" />
         <separator />
         <menuitem action="debug-dump-items" />



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