Use the actor's debug name consistently

Do not use the generic GType class name: we have a :name property on
ClutterActor that is generally used for debugging purposes — so we
should use it when creating debugging spew in a consistent way.
This commit is contained in:
Emmanuele Bassi 2011-04-14 17:58:15 +01:00
parent 3889272f52
commit e467ad5ad1
2 changed files with 22 additions and 18 deletions

View File

@ -884,7 +884,7 @@ clutter_actor_update_map_state (ClutterActor *self,
{ {
g_warning ("Clutter toplevel of type '%s' is not visible, but " g_warning ("Clutter toplevel of type '%s' is not visible, but "
"it is somehow still mapped", "it is somehow still mapped",
G_OBJECT_TYPE_NAME (self)); _clutter_actor_get_debug_name (self));
} }
} }
else else
@ -2490,7 +2490,7 @@ _clutter_actor_draw_paint_volume (ClutterActor *self)
cogl_color_init_from_4f (&color, 0, 0, 1, 1); cogl_color_init_from_4f (&color, 0, 0, 1, 1);
_clutter_actor_draw_paint_volume_full (self, &fake_pv, _clutter_actor_draw_paint_volume_full (self, &fake_pv,
G_OBJECT_TYPE_NAME (self), _clutter_actor_get_debug_name (self),
&color); &color);
clutter_paint_volume_free (&fake_pv); clutter_paint_volume_free (&fake_pv);
@ -2499,7 +2499,7 @@ _clutter_actor_draw_paint_volume (ClutterActor *self)
{ {
cogl_color_init_from_4f (&color, 0, 1, 0, 1); cogl_color_init_from_4f (&color, 0, 1, 0, 1);
_clutter_actor_draw_paint_volume_full (self, pv, _clutter_actor_draw_paint_volume_full (self, pv,
G_OBJECT_TYPE_NAME (self), _clutter_actor_get_debug_name (self),
&color); &color);
} }
} }
@ -2526,13 +2526,13 @@ _clutter_actor_paint_cull_result (ClutterActor *self,
if (success && (pv = _clutter_actor_get_paint_volume_mutable (self))) if (success && (pv = _clutter_actor_get_paint_volume_mutable (self)))
_clutter_actor_draw_paint_volume_full (self, pv, _clutter_actor_draw_paint_volume_full (self, pv,
G_OBJECT_TYPE_NAME (self), _clutter_actor_get_debug_name (self),
&color); &color);
else else
{ {
PangoLayout *layout; PangoLayout *layout;
char *label = char *label =
g_strdup_printf ("CULL FAILURE: %s", G_OBJECT_TYPE_NAME (self)); g_strdup_printf ("CULL FAILURE: %s", _clutter_actor_get_debug_name (self));
cogl_color_init_from_4f (&color, 1, 1, 1, 1); cogl_color_init_from_4f (&color, 1, 1, 1, 1);
cogl_set_source_color (&color); cogl_set_source_color (&color);
@ -2584,7 +2584,7 @@ cull_actor (ClutterActor *self, ClutterCullResult *result_out)
{ {
CLUTTER_NOTE (CLIPPING, "Bail from cull_actor without culling (%s): " CLUTTER_NOTE (CLIPPING, "Bail from cull_actor without culling (%s): "
"->last_paint_volume_valid == FALSE", "->last_paint_volume_valid == FALSE",
G_OBJECT_TYPE_NAME (self)); _clutter_actor_get_debug_name (self));
return FALSE; return FALSE;
} }
@ -2597,7 +2597,7 @@ cull_actor (ClutterActor *self, ClutterCullResult *result_out)
{ {
CLUTTER_NOTE (CLIPPING, "Bail from cull_actor without culling (%s): " CLUTTER_NOTE (CLIPPING, "Bail from cull_actor without culling (%s): "
"No stage clip set", "No stage clip set",
G_OBJECT_TYPE_NAME (self)); _clutter_actor_get_debug_name (self));
return FALSE; return FALSE;
} }
@ -2606,7 +2606,7 @@ cull_actor (ClutterActor *self, ClutterCullResult *result_out)
{ {
CLUTTER_NOTE (CLIPPING, "Bail from cull_actor without culling (%s): " CLUTTER_NOTE (CLIPPING, "Bail from cull_actor without culling (%s): "
"Current framebuffer doesn't correspond to stage", "Current framebuffer doesn't correspond to stage",
G_OBJECT_TYPE_NAME (self)); _clutter_actor_get_debug_name (self));
return FALSE; return FALSE;
} }
@ -2632,7 +2632,7 @@ _clutter_actor_update_last_paint_volume (ClutterActor *self)
{ {
CLUTTER_NOTE (CLIPPING, "Bail from update_last_paint_volume (%s): " CLUTTER_NOTE (CLIPPING, "Bail from update_last_paint_volume (%s): "
"Actor failed to report a paint volume", "Actor failed to report a paint volume",
G_OBJECT_TYPE_NAME (self)); _clutter_actor_get_debug_name (self));
return; return;
} }
@ -5820,7 +5820,7 @@ clutter_actor_allocate (ClutterActor *self,
{ {
g_warning ("Spurious clutter_actor_allocate called for actor %p/%s " g_warning ("Spurious clutter_actor_allocate called for actor %p/%s "
"which isn't a descendent of the stage!\n", "which isn't a descendent of the stage!\n",
self, G_OBJECT_TYPE_NAME (self)); self, _clutter_actor_get_debug_name (self));
return; return;
} }
@ -11680,7 +11680,7 @@ _clutter_actor_get_paint_volume_real (ClutterActor *self,
{ {
CLUTTER_NOTE (CLIPPING, "Bail from get_paint_volume (%s): " CLUTTER_NOTE (CLIPPING, "Bail from get_paint_volume (%s): "
"Actor needs allocation", "Actor needs allocation",
G_OBJECT_TYPE_NAME (self)); _clutter_actor_get_debug_name (self));
return FALSE; return FALSE;
} }
@ -11718,7 +11718,7 @@ _clutter_actor_get_paint_volume_real (ClutterActor *self,
{ {
CLUTTER_NOTE (CLIPPING, "Bail from get_paint_volume (%s): " CLUTTER_NOTE (CLIPPING, "Bail from get_paint_volume (%s): "
"Actor has \"paint\" signal handlers", "Actor has \"paint\" signal handlers",
G_OBJECT_TYPE_NAME (self)); _clutter_actor_get_debug_name (self));
return FALSE; return FALSE;
} }
@ -11729,7 +11729,7 @@ _clutter_actor_get_paint_volume_real (ClutterActor *self,
clutter_paint_volume_free (pv); clutter_paint_volume_free (pv);
CLUTTER_NOTE (CLIPPING, "Bail from get_paint_volume (%s): " CLUTTER_NOTE (CLIPPING, "Bail from get_paint_volume (%s): "
"Actor failed to report a volume", "Actor failed to report a volume",
G_OBJECT_TYPE_NAME (self)); _clutter_actor_get_debug_name (self));
return FALSE; return FALSE;
} }
@ -11755,7 +11755,7 @@ _clutter_actor_get_paint_volume_real (ClutterActor *self,
clutter_paint_volume_free (pv); clutter_paint_volume_free (pv);
CLUTTER_NOTE (CLIPPING, "Bail from get_paint_volume (%s): " CLUTTER_NOTE (CLIPPING, "Bail from get_paint_volume (%s): "
"Effect (%s) failed to report a volume", "Effect (%s) failed to report a volume",
G_OBJECT_TYPE_NAME (self), _clutter_actor_get_debug_name (self),
G_OBJECT_TYPE_NAME (l->data)); G_OBJECT_TYPE_NAME (l->data));
return FALSE; return FALSE;
} }
@ -11773,7 +11773,7 @@ _clutter_actor_get_paint_volume_real (ClutterActor *self,
clutter_paint_volume_free (pv); clutter_paint_volume_free (pv);
CLUTTER_NOTE (CLIPPING, "Bail from get_paint_volume (%s): " CLUTTER_NOTE (CLIPPING, "Bail from get_paint_volume (%s): "
"Effect (%s) failed to report a volume", "Effect (%s) failed to report a volume",
G_OBJECT_TYPE_NAME (self), _clutter_actor_get_debug_name (self),
G_OBJECT_TYPE_NAME (l->data)); G_OBJECT_TYPE_NAME (l->data));
return FALSE; return FALSE;
} }
@ -11992,7 +11992,11 @@ _clutter_debug_print_actor_cb (ClutterActor *actor,
int depth, int depth,
void *user_data) void *user_data)
{ {
g_print ("%*s%s:%p\n", depth * 2, "", G_OBJECT_TYPE_NAME (actor), actor); g_print ("%*s%s:%p\n",
depth * 2, "",
_clutter_actor_get_debug_name (actor),
actor);
return CLUTTER_ACTOR_TRAVERSE_VISIT_CONTINUE; return CLUTTER_ACTOR_TRAVERSE_VISIT_CONTINUE;
} }

View File

@ -3600,7 +3600,7 @@ _clutter_stage_queue_actor_redraw (ClutterStage *stage,
ClutterStagePrivate *priv = stage->priv; ClutterStagePrivate *priv = stage->priv;
CLUTTER_NOTE (CLIPPING, "stage_queue_actor_redraw (actor=%s, clip=%p): ", CLUTTER_NOTE (CLIPPING, "stage_queue_actor_redraw (actor=%s, clip=%p): ",
G_OBJECT_TYPE_NAME (actor), clip); _clutter_actor_get_debug_name (actor), clip);
if (!priv->redraw_pending) if (!priv->redraw_pending)
{ {
@ -3641,7 +3641,7 @@ _clutter_stage_queue_actor_redraw (ClutterStage *stage,
{ {
CLUTTER_NOTE (CLIPPING, "Bail from stage_queue_actor_redraw (%s): " CLUTTER_NOTE (CLIPPING, "Bail from stage_queue_actor_redraw (%s): "
"Unclipped redraw of actor already queued", "Unclipped redraw of actor already queued",
G_OBJECT_CLASS_NAME (actor)); _clutter_actor_get_debug_name (actor));
return entry; return entry;
} }