From 7972594d267ef96d182908a21d090d842a400479 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Fri, 16 Sep 2022 21:29:28 -0700 Subject: [PATCH] clutter/frame-clock: Fix dispatch lateness trace text It was unfortunately broken by a variable overwrite in https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2161. Part-of: --- clutter/clutter/clutter-frame-clock.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/clutter/clutter/clutter-frame-clock.c b/clutter/clutter/clutter-frame-clock.c index b223b8545..4d441c364 100644 --- a/clutter/clutter/clutter-frame-clock.c +++ b/clutter/clutter/clutter-frame-clock.c @@ -664,10 +664,12 @@ clutter_frame_clock_dispatch (ClutterFrameClock *frame_clock, #ifdef COGL_HAS_TRACING int64_t this_dispatch_ready_time_us; + int64_t this_dispatch_time_us; COGL_TRACE_BEGIN_SCOPED (ClutterFrameClockDispatch, "Frame Clock (dispatch)"); this_dispatch_ready_time_us = g_source_get_ready_time (frame_clock->source); + this_dispatch_time_us = time_us; #endif ideal_dispatch_time_us = (frame_clock->last_dispatch_time_us - @@ -737,7 +739,7 @@ clutter_frame_clock_dispatch (ClutterFrameClock *frame_clock, { g_autofree char *description = NULL; description = g_strdup_printf ("dispatched %ld µs late", - time_us - this_dispatch_ready_time_us); + this_dispatch_time_us - this_dispatch_ready_time_us); COGL_TRACE_DESCRIBE (ClutterFrameClockDispatch, description); } #endif