app: fix GIMP_TIMER_END() to take an arbitrary string
not a string constant that only works in the C preprocessor, and add a timer to gimp_apply_operation().
This commit is contained in:
@ -28,6 +28,7 @@
|
||||
|
||||
#include "gegl/gimp-gegl-utils.h"
|
||||
|
||||
#include "gimp-utils.h"
|
||||
#include "gimp-apply-operation.h"
|
||||
#include "gimpprogress.h"
|
||||
|
||||
@ -92,10 +93,18 @@ gimp_apply_operation (GeglBuffer *src_buffer,
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef GIMP_UNSTABLE
|
||||
GIMP_TIMER_START ();
|
||||
#endif
|
||||
|
||||
while (gegl_processor_work (processor, &value))
|
||||
if (progress)
|
||||
gimp_progress_set_value (progress, value);
|
||||
|
||||
#ifdef GIMP_UNSTABLE
|
||||
GIMP_TIMER_END (undo_desc ? undo_desc : "operation");
|
||||
#endif
|
||||
|
||||
g_object_unref (processor);
|
||||
|
||||
g_object_unref (gegl);
|
||||
|
@ -23,8 +23,8 @@
|
||||
{ GTimer *_timer = g_timer_new ();
|
||||
|
||||
#define GIMP_TIMER_END(message) \
|
||||
g_printerr ("%s: " message " took %0.2f seconds\n", \
|
||||
G_STRFUNC, g_timer_elapsed (_timer, NULL)); \
|
||||
g_printerr ("%s: %s took %0.2f seconds\n", \
|
||||
G_STRFUNC, message, g_timer_elapsed (_timer, NULL)); \
|
||||
g_timer_destroy (_timer); }
|
||||
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
#include "gegl/gimp-gegl-utils.h"
|
||||
|
||||
#include "gimp-utils.h" /* temp for GIMP_TIMER */
|
||||
#include "gimp-utils.h"
|
||||
#include "gimpchannel.h"
|
||||
#include "gimpcontext.h"
|
||||
#include "gimpdrawable-combine.h"
|
||||
@ -434,10 +434,6 @@ gimp_drawable_scale (GimpItem *item,
|
||||
new_width, new_height),
|
||||
gimp_drawable_get_format (drawable));
|
||||
|
||||
#ifdef GIMP_UNSTABLE
|
||||
GIMP_TIMER_START ();
|
||||
#endif
|
||||
|
||||
scale = g_object_new (GEGL_TYPE_NODE,
|
||||
"operation", "gegl:scale",
|
||||
NULL);
|
||||
@ -458,10 +454,6 @@ gimp_drawable_scale (GimpItem *item,
|
||||
scale, new_buffer);
|
||||
g_object_unref (scale);
|
||||
|
||||
#ifdef GIMP_UNSTABLE
|
||||
GIMP_TIMER_END ("scaling");
|
||||
#endif
|
||||
|
||||
gimp_drawable_set_buffer_full (drawable, gimp_item_is_attached (item), NULL,
|
||||
new_buffer,
|
||||
new_offset_x, new_offset_y);
|
||||
|
Reference in New Issue
Block a user