mirror of
https://github.com/brl/mutter.git
synced 2024-11-29 03:20:46 -05:00
clutter/frame-clock: Limit jitter measurements to one frame interval (100%)
Measurements above 100% were originally allowed to show when frame skipping was occurring so you didn't have to also check the frame rate. But that also resulted in arbitrarily high jitter values being reported when returning from idle. And those are frequent enough to look like a bug or untrustworthy so let's not do that anymore. Taking the remainder of a high jitter value is still a meaningful jitter value. Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2906 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3123>
This commit is contained in:
parent
7faf4a308e
commit
7c0caf5727
@ -745,7 +745,8 @@ clutter_frame_clock_dispatch (ClutterFrameClock *frame_clock,
|
|||||||
|
|
||||||
dispatch_interval_us = time_us - frame_clock->last_dispatch_time_us;
|
dispatch_interval_us = time_us - frame_clock->last_dispatch_time_us;
|
||||||
jitter_us = llabs (dispatch_interval_us -
|
jitter_us = llabs (dispatch_interval_us -
|
||||||
frame_clock->last_dispatch_interval_us);
|
frame_clock->last_dispatch_interval_us) %
|
||||||
|
frame_clock->refresh_interval_us;
|
||||||
frame_clock->last_dispatch_interval_us = dispatch_interval_us;
|
frame_clock->last_dispatch_interval_us = dispatch_interval_us;
|
||||||
CLUTTER_NOTE (FRAME_TIMINGS, "dispatch jitter %5ldµs (%3ld%%)",
|
CLUTTER_NOTE (FRAME_TIMINGS, "dispatch jitter %5ldµs (%3ld%%)",
|
||||||
jitter_us,
|
jitter_us,
|
||||||
|
Loading…
Reference in New Issue
Block a user