debug: Add more CLIPPING debug notes

To give quick visibility to the things going on relating to clipping and
culling this adds some more CLIPPING debug notes to clutter-actor.c and
clutter-stage.c
This commit is contained in:
Robert Bragg 2011-03-10 18:50:23 +00:00
parent 3303b08174
commit 5ce13b58fe
2 changed files with 24 additions and 3 deletions

View File

@ -2525,7 +2525,12 @@ cull_actor (ClutterActor *self)
ClutterCullResult result; ClutterCullResult result;
if (!priv->last_paint_volume_valid) if (!priv->last_paint_volume_valid)
return FALSE; {
CLUTTER_NOTE (CLIPPING, "Bail from cull_actor without culling (%s): "
"->last_paint_volume_valid == FALSE",
G_OBJECT_TYPE_NAME (self));
return FALSE;
}
if (G_UNLIKELY (clutter_paint_debug_flags & CLUTTER_DEBUG_DISABLE_CULLING)) if (G_UNLIKELY (clutter_paint_debug_flags & CLUTTER_DEBUG_DISABLE_CULLING))
return FALSE; return FALSE;
@ -2533,7 +2538,12 @@ cull_actor (ClutterActor *self)
stage = _clutter_actor_get_stage_internal (self); stage = _clutter_actor_get_stage_internal (self);
stage_clip = _clutter_stage_get_clip (CLUTTER_STAGE (stage)); stage_clip = _clutter_stage_get_clip (CLUTTER_STAGE (stage));
if (G_UNLIKELY (!stage_clip)) if (G_UNLIKELY (!stage_clip))
return FALSE; {
CLUTTER_NOTE (CLIPPING, "Bail from cull_actor without culling (%s): "
"No stage clip set",
G_OBJECT_TYPE_NAME (self));
return FALSE;
}
result = _clutter_paint_volume_cull (&priv->last_paint_volume, stage_clip); result = _clutter_paint_volume_cull (&priv->last_paint_volume, stage_clip);
if (result == CLUTTER_CULL_RESULT_IN || if (result == CLUTTER_CULL_RESULT_IN ||
@ -2557,7 +2567,12 @@ _clutter_actor_update_last_paint_volume (ClutterActor *self)
pv = clutter_actor_get_paint_volume (self); pv = clutter_actor_get_paint_volume (self);
if (!pv) if (!pv)
return; {
CLUTTER_NOTE (CLIPPING, "Bail from update_last_paint_volume (%s): "
"Actor failed to report a paint volume",
G_OBJECT_TYPE_NAME (self));
return;
}
_clutter_paint_volume_copy_static (pv, &priv->last_paint_volume); _clutter_paint_volume_copy_static (pv, &priv->last_paint_volume);

View File

@ -525,6 +525,12 @@ _clutter_stage_do_paint (ClutterStage *stage, const ClutterGeometry *clip)
clip_poly[7] = geom.height; clip_poly[7] = geom.height;
} }
CLUTTER_NOTE (CLIPPING, "Setting stage clip too: "
"x=%f, y=%f, width=%f, height=%f",
clip_poly[0], clip_poly[1],
clip_poly[2] - clip_poly[0],
clip_poly[5] - clip_poly[1]);
_cogl_util_get_eye_planes_for_screen_poly (clip_poly, _cogl_util_get_eye_planes_for_screen_poly (clip_poly,
4, 4,
priv->viewport, priv->viewport,