clutter: Add swap time and GPU rendering duration to FrameInfo

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1762>
This commit is contained in:
Ivan Molodetskikh 2021-01-06 15:40:23 +03:00 committed by Marge Bot
parent 1116b14f38
commit 8c4a91ddd6
2 changed files with 7 additions and 0 deletions

View File

@ -149,6 +149,9 @@ struct _ClutterFrameInfo
ClutterFrameInfoFlag flags; ClutterFrameInfoFlag flags;
unsigned int sequence; unsigned int sequence;
int64_t gpu_rendering_duration_ns;
int64_t cpu_time_before_buffer_swap_us;
}; };
typedef struct _ClutterCapture typedef struct _ClutterCapture

View File

@ -849,6 +849,10 @@ frame_cb (CoglOnscreen *onscreen,
cogl_frame_info_get_presentation_time_us (frame_info), cogl_frame_info_get_presentation_time_us (frame_info),
.flags = flags, .flags = flags,
.sequence = cogl_frame_info_get_sequence (frame_info), .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); clutter_stage_view_notify_presented (view, &clutter_frame_info);
} }