diff options
author | Jonas Ådahl <jadahl@gmail.com> | 2021-02-03 00:04:51 +0100 |
---|---|---|
committer | Jonas Ådahl <jadahl@gmail.com> | 2021-07-29 15:37:29 +0200 |
commit | 5c7795dfa91229237f27d10597b2d5db97890a4f (patch) | |
tree | 9afdf200be34781ca1c68cb79ab2e98a8ff72e61 | |
parent | 9d22e7153cecede8f9f96b3866229ed3a71d560c (diff) | |
download | mutter-5c7795dfa91229237f27d10597b2d5db97890a4f.tar.gz |
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>
-rw-r--r-- | clutter/clutter/clutter-actor.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c index e32e878dc..b471589a6 100644 --- a/clutter/clutter/clutter-actor.c +++ b/clutter/clutter/clutter-actor.c @@ -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); |