mutter/clutter
Michel Dänzer ca341ef1ea frame-clock: Simplify dynamic max render time calculation
Store only two values per kind of duration: The short term and long term
maximum.

The short term maximum is updated in each frame clock dispatch. The long
term maximum is updated at most once per second: If the short term
maximum is higher, the long term maximum is updated to match it.
Otherwise, a fraction of the delta between the two maxima is subtracted
from the long term maximum.

Compared to the previous algorithm:

* The calculcations are simpler.
* The calculated max render time has a slow exponential drop-off (by at
  most a few milliseconds every second) instead of potentially abruptly
  dropping after as few as 16 frames.

This should fix https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4830
since the short term maximum should always include a sample from the
clock's second tick.

v2:
* Use divisor 2 instead of 4.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2500>
2022-12-17 23:45:19 +00:00
..
clutter frame-clock: Simplify dynamic max render time calculation 2022-12-17 23:45:19 +00:00
.gitignore clutter: Remove clutter specific version 2018-11-06 17:17:36 +01:00
meson.build meson: Split x11 option into backend/xwayland 2022-05-25 16:42:04 +02:00