[mutter] clutter: Add swap time and GPU rendering duration to FrameInfo
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] clutter: Add swap time and GPU rendering duration to FrameInfo
- Date: Tue, 13 Jul 2021 08:41:55 +0000 (UTC)
commit 8c4a91ddd62823f8116487722e214db919f63944
Author: Ivan Molodetskikh <yalterz gmail com>
Date: Wed Jan 6 15:40:23 2021 +0300
clutter: Add swap time and GPU rendering duration to FrameInfo
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1762>
clutter/clutter/clutter-stage.h | 3 +++
clutter/clutter/cogl/clutter-stage-cogl.c | 4 ++++
2 files changed, 7 insertions(+)
---
diff --git a/clutter/clutter/clutter-stage.h b/clutter/clutter/clutter-stage.h
index 9f25e54726..69ab1d6eba 100644
--- a/clutter/clutter/clutter-stage.h
+++ b/clutter/clutter/clutter-stage.h
@@ -149,6 +149,9 @@ struct _ClutterFrameInfo
ClutterFrameInfoFlag flags;
unsigned int sequence;
+
+ int64_t gpu_rendering_duration_ns;
+ int64_t cpu_time_before_buffer_swap_us;
};
typedef struct _ClutterCapture
diff --git a/clutter/clutter/cogl/clutter-stage-cogl.c b/clutter/clutter/cogl/clutter-stage-cogl.c
index 124f24cbdf..4f1c305f96 100644
--- a/clutter/clutter/cogl/clutter-stage-cogl.c
+++ b/clutter/clutter/cogl/clutter-stage-cogl.c
@@ -849,6 +849,10 @@ frame_cb (CoglOnscreen *onscreen,
cogl_frame_info_get_presentation_time_us (frame_info),
.flags = flags,
.sequence = cogl_frame_info_get_sequence (frame_info),
+ .gpu_rendering_duration_ns =
+ cogl_frame_info_get_rendering_duration_ns (frame_info),
+ .cpu_time_before_buffer_swap_us =
+ cogl_frame_info_get_time_before_buffer_swap_us (frame_info),
};
clutter_stage_view_notify_presented (view, &clutter_frame_info);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]