clutter/actor: Optionally trace painting

If 'detailed-trace' is enabled, trace the painting of every actor every
frame, and pass along the type and name of the actor to sysprof.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1700>
This commit is contained in:
Jonas Ådahl 2021-02-03 00:04:51 +01:00
parent 9d22e7153c
commit 5c7795dfa9

View File

@ -3651,6 +3651,16 @@ clutter_actor_paint (ClutterActor *self,
if (!CLUTTER_ACTOR_IS_MAPPED (self))
return;
COGL_TRACE_SCOPED_ANCHOR (ClutterActorPaint);
if (G_UNLIKELY (clutter_debug_flags & CLUTTER_DEBUG_DETAILED_TRACE))
{
COGL_TRACE_BEGIN_ANCHORED (ClutterActorPaint,
"ClutterActor (paint)");
COGL_TRACE_DESCRIBE (ClutterActorPaint,
_clutter_actor_get_debug_name (self));
}
actor_node = clutter_actor_node_new (self, -1);
root_node = clutter_paint_node_ref (actor_node);