[clutter] Remove CLUTTER_TIMESTAMP debug macro



commit c6e487a5c121dc64604232eb971a4d959ea1b3d2
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Tue Nov 15 16:07:13 2011 +0000

    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.

 clutter/clutter-debug.h    |   16 ----------------
 clutter/clutter-main.c     |    2 +-
 clutter/clutter-stage.c    |   12 ++++++------
 clutter/clutter-timeline.c |    6 +++---
 4 files changed, 10 insertions(+), 26 deletions(-)
---
diff --git a/clutter/clutter-debug.h b/clutter/clutter-debug.h
index 9cd02b2..5cce833 100644
--- a/clutter/clutter-debug.h
+++ b/clutter/clutter-debug.h
@@ -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 */
diff --git a/clutter/clutter-main.c b/clutter/clutter-main.c
index bc7f369..6d01afc 100644
--- a/clutter/clutter-main.c
+++ b/clutter/clutter-main.c
@@ -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);
 
diff --git a/clutter/clutter-stage.c b/clutter/clutter-stage.c
index 54a3466..9ab7a3a 100644
--- a/clutter/clutter-stage.c
+++ b/clutter/clutter-stage.c
@@ -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);
 }
 
 /**
diff --git a/clutter/clutter-timeline.c b/clutter/clutter-timeline.c
index 2f6e511..ac8ec17 100644
--- a/clutter/clutter-timeline.c
+++ b/clutter/clutter-timeline.c
@@ -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)



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