mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
35aa278194
That could happen if the backend did not provide presentation timestamps, or if the screen was not changing other than the hardware cursor: if (stage_cogl->last_presentation_time == 0|| stage_cogl->last_presentation_time < now - 150000) { stage_cogl->update_time = now; return; } By setting `update_time` to `now`, master_clock_get_swap_wait_time() returns 0: gint64 now = g_source_get_time (master_clock->source); if (min_update_time < now) { return 0; } else { gint64 delay_us = min_update_time - now; return (delay_us + 999) / 1000; } However, zero is a value unsupported by the default master clock due to: if (swap_delay != 0) return swap_delay; All cases are now handled by extrapolating when the next presentation time would be and calculating an appropriate update time to meet that. We also need to add a check for `update_time == last_update_time`, which is a situation that just became possible since we support old (or zero) values of `last_presentation_time`. This avoids getting more than one stage update per frame interval when input events arrive without triggering a stage redraw (e.g. moving the hardware cursor). https://gitlab.gnome.org/GNOME/mutter/merge_requests/363 |
||
---|---|---|
.. | ||
clutter | ||
tests | ||
.gitignore | ||
meson.build |