From 5ce13b58fe9166e00384114983eaea8a07ca935a Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Thu, 10 Mar 2011 18:50:23 +0000 Subject: [PATCH] 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 --- clutter/clutter-actor.c | 21 ++++++++++++++++++--- clutter/clutter-stage.c | 6 ++++++ 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c index dea3036a8..d90b2131a 100644 --- a/clutter/clutter-actor.c +++ b/clutter/clutter-actor.c @@ -2525,7 +2525,12 @@ cull_actor (ClutterActor *self) ClutterCullResult result; 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)) return FALSE; @@ -2533,7 +2538,12 @@ cull_actor (ClutterActor *self) stage = _clutter_actor_get_stage_internal (self); stage_clip = _clutter_stage_get_clip (CLUTTER_STAGE (stage)); 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); 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); 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); diff --git a/clutter/clutter-stage.c b/clutter/clutter-stage.c index b8b1a42f7..a5694a448 100644 --- a/clutter/clutter-stage.c +++ b/clutter/clutter-stage.c @@ -525,6 +525,12 @@ _clutter_stage_do_paint (ClutterStage *stage, const ClutterGeometry *clip) 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, 4, priv->viewport,