[mutter] clutter: Add FRAME_TIMINGS debug key



commit 4a4e61c1f1a2f95a3f0e99e78816872e3c336e9a
Author: Ivan Molodetskikh <yalterz gmail com>
Date:   Wed Jan 13 09:32:44 2021 +0300

    clutter: Add FRAME_TIMINGS debug key
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1762>

 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 1a31ed59ba..57040e0752 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 d79b690a3d..bbefd62d08 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 10e2aca997..74abc29a07 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]