From 4a4e61c1f1a2f95a3f0e99e78816872e3c336e9a Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Wed, 13 Jan 2021 09:32:44 +0300 Subject: [PATCH] clutter: Add FRAME_TIMINGS debug key Part-of: --- clutter/clutter/clutter-frame-clock.c | 6 ++++++ clutter/clutter/clutter-main.c | 1 + clutter/clutter/clutter-main.h | 1 + 3 files changed, 8 insertions(+) diff --git a/clutter/clutter/clutter-frame-clock.c b/clutter/clutter/clutter-frame-clock.c index 1a31ed59b..57040e075 100644 --- a/clutter/clutter/clutter-frame-clock.c +++ b/clutter/clutter/clutter-frame-clock.c @@ -231,6 +231,12 @@ clutter_frame_clock_notify_presented (ClutterFrameClock *frame_clock, frame_clock->last_flip_time_us - frame_info->cpu_time_before_buffer_swap_us; + CLUTTER_NOTE (FRAME_TIMINGS, + "dispatch2swap %ld µs, swap2render %ld µs, swap2flip %ld µs", + dispatch_to_swap_us, + swap_to_rendering_done_us, + swap_to_flip_us); + estimate_queue_add_value (&frame_clock->dispatch_to_swap_us, dispatch_to_swap_us); estimate_queue_add_value (&frame_clock->swap_to_rendering_done_us, diff --git a/clutter/clutter/clutter-main.c b/clutter/clutter/clutter-main.c index d79b690a3..bbefd62d0 100644 --- a/clutter/clutter/clutter-main.c +++ b/clutter/clutter/clutter-main.c @@ -112,6 +112,7 @@ static const GDebugKey clutter_debug_keys[] = { { "layout", CLUTTER_DEBUG_LAYOUT }, { "clipping", CLUTTER_DEBUG_CLIPPING }, { "oob-transforms", CLUTTER_DEBUG_OOB_TRANSFORMS }, + { "frame-timings", CLUTTER_DEBUG_FRAME_TIMINGS }, }; #endif /* CLUTTER_ENABLE_DEBUG */ diff --git a/clutter/clutter/clutter-main.h b/clutter/clutter/clutter-main.h index 10e2aca99..74abc29a0 100644 --- a/clutter/clutter/clutter-main.h +++ b/clutter/clutter/clutter-main.h @@ -53,6 +53,7 @@ typedef enum CLUTTER_DEBUG_EVENTLOOP = 1 << 14, CLUTTER_DEBUG_CLIPPING = 1 << 15, CLUTTER_DEBUG_OOB_TRANSFORMS = 1 << 16, + CLUTTER_DEBUG_FRAME_TIMINGS = 1 << 17, } ClutterDebugFlag; typedef enum