Remove CLUTTER_TIMESTAMP debug macro

It's pretty much unused, and it doesn't print out really informative
messages. We should make CLUTTER_NOTE print out a decent timestamp
instead.
This commit is contained in:
Emmanuele Bassi 2011-11-15 16:07:13 +00:00
parent 8b2df7ced9
commit c6e487a5c1
4 changed files with 10 additions and 26 deletions

View File

@ -56,11 +56,6 @@ typedef enum {
G_STRLOC ": " x, ##a); } \
} G_STMT_END
#define CLUTTER_TIMESTAMP(type,x,a...) G_STMT_START { \
if (G_UNLIKELY (CLUTTER_HAS_DEBUG (type))) \
{ g_message ("[" #type "]" " %li:" G_STRLOC ": " \
x, clutter_get_timestamp(), ##a); } \
} G_STMT_END
#else /* !__GNUC__ */
/* Try the C99 version; unfortunately, this does not allow us to pass
* empty arguments to the macro, which means we have to
@ -75,16 +70,6 @@ typedef enum {
g_free (_fmt); \
} \
} G_STMT_END
#define CLUTTER_TIMESTAMP(type,...) G_STMT_START { \
if (G_UNLIKELY (CLUTTER_HAS_DEBUG (type))) \
{ \
gchar * _fmt = g_strdup_printf (__VA_ARGS__); \
g_message ("[" #type "]" " %li:" G_STRLOC ": %s", \
clutter_get_timestamp(), _fmt); \
g_free (_fmt); \
} \
} G_STMT_END
#endif
#define CLUTTER_MARK() CLUTTER_NOTE(MISC, "== mark ==")
@ -104,7 +89,6 @@ typedef enum {
#define CLUTTER_MARK() G_STMT_START { } G_STMT_END
#define CLUTTER_DBG(x) G_STMT_START { } G_STMT_END
#define CLUTTER_GLERR() G_STMT_START { } G_STMT_END
#define CLUTTER_TIMESTAMP(type,...) G_STMT_START { } G_STMT_END
#define CLUTTER_HAS_DEBUG(type) FALSE
#endif /* CLUTTER_ENABLE_DEBUG */

View File

@ -2624,7 +2624,7 @@ _clutter_process_event (ClutterEvent *event)
if (stage == NULL)
return;
CLUTTER_TIMESTAMP (EVENT, "Event received");
CLUTTER_NOTE (EVENT, "Event received");
context->last_event_time = clutter_event_get_time (event);

View File

@ -1034,9 +1034,9 @@ clutter_stage_do_redraw (ClutterStage *stage)
ClutterActor *actor = CLUTTER_ACTOR (stage);
ClutterStagePrivate *priv = stage->priv;
CLUTTER_TIMESTAMP (SCHEDULER, "Redraw started for %s[%p]",
_clutter_actor_get_debug_name (actor),
stage);
CLUTTER_NOTE (PAINT, "Redraw started for stage '%s'[%p]",
_clutter_actor_get_debug_name (actor),
stage);
_clutter_stage_set_pick_buffer_valid (stage, FALSE, -1);
priv->picks_per_frame = 0;
@ -1068,9 +1068,9 @@ clutter_stage_do_redraw (ClutterStage *stage)
}
}
CLUTTER_TIMESTAMP (SCHEDULER, "Redraw finished for %s[%p]",
_clutter_actor_get_debug_name (actor),
stage);
CLUTTER_NOTE (PAINT, "Redraw finished for stage '%s'[%p]",
_clutter_actor_get_debug_name (actor),
stage);
}
/**

View File

@ -600,9 +600,9 @@ clutter_timeline_do_frame (ClutterTimeline *timeline)
g_object_ref (timeline);
CLUTTER_TIMESTAMP (SCHEDULER, "Timeline [%p] activated (cur: %ld)\n",
timeline,
(long) priv->elapsed_time);
CLUTTER_NOTE (SCHEDULER, "Timeline [%p] activated (cur: %ld)\n",
timeline,
(long) priv->elapsed_time);
/* Advance time */
if (priv->direction == CLUTTER_TIMELINE_FORWARD)