clutter/frame-clock: Treat GPU rendering duration of 0 as valid

This is expected for the common case of direct scanout of Wayland
buffers where transactions guarantee that all buffer fences are
signalled before a buffer is included in a frame.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3080>
This commit is contained in:
Dor Askayo 2023-06-19 01:22:28 +03:00 committed by Marge Bot
parent b43fb9fd98
commit e30eb78891

View File

@ -323,8 +323,7 @@ clutter_frame_clock_notify_presented (ClutterFrameClock *frame_clock,
frame_clock->got_measurements_last_frame = FALSE;
if (frame_info->cpu_time_before_buffer_swap_us != 0 &&
frame_info->gpu_rendering_duration_ns != 0)
if (frame_info->cpu_time_before_buffer_swap_us != 0)
{
int64_t dispatch_to_swap_us, swap_to_rendering_done_us, swap_to_flip_us;