Alexander Larsson
91af8a705b
frame clock: Better handle non-regular clock cycles
...
We try to step the frame clock in whole refresh_interval steps, but to
avoid drift and rounding issues we additionally try to converge it to
be synced to the physical vblank (actually the time we get the
frame-drawn message from the compositor, but these are tied together).
However, the convergence to vsync only really makes sense if the new
frame_time actually is tied to the vsync. It may very well be that
some other kind of event (say a network or mouse event) triggered
the redraw, and not a vsync presentation.
We used to assume that all frames that are close in time (< 4 frames
apart) were regular and thus tied to the vsync, but there is really no
guarantee of that. Even non regular times could be rapid.
This commit changes the code to only do the convergence-to-real-time
if the cause of the clock cycle was a thaw (i.e. last frame drawn and
animating). Paint cycles for any other kind of reason are always
scheduled an integer number of frames after the last cycle that was
caused by a thaw.
2020-06-05 11:30:47 +02:00
..
2020-05-19 13:07:38 -07:00
2020-05-28 11:00:03 +03:00
2016-11-01 15:42:46 -03:00
2020-06-04 20:44:55 +02:00
2020-05-31 17:09:23 +02:00
2020-05-28 11:00:03 +03:00
2020-04-26 14:41:52 -04:00
2020-02-04 14:08:10 +01:00
2020-01-17 23:46:37 -05:00
2020-04-06 16:32:03 -04:00
2020-05-13 04:48:22 +02:00
2020-05-26 20:52:41 -04:00
2020-03-12 14:56:21 -04:00
2020-05-11 19:26:20 +02:00
2020-02-24 08:32:34 -05:00
2017-12-10 01:09:14 +01:00
2020-02-13 07:36:38 +01:00
2020-02-13 07:36:38 +01:00
2018-05-01 12:35:32 +02:00
2019-11-27 13:33:43 +00:00
2018-05-15 13:49:45 +08:00
2019-12-12 14:25:33 -05:00
2019-11-27 13:33:43 +00:00
2019-04-02 15:10:53 +00:00
2019-12-28 21:52:34 -05:00
2019-11-27 13:33:43 +00:00
2019-11-27 13:33:43 +00:00
2019-03-17 21:29:59 +01:00
2020-01-17 23:46:37 -05:00
2019-11-27 13:33:43 +00:00
2020-05-11 19:26:20 +02:00
2020-03-02 04:43:56 +01:00
2017-11-20 23:15:11 +01:00
2020-05-11 19:26:20 +02:00
2019-11-27 13:33:43 +00:00
2020-05-07 11:27:45 +02:00
2020-02-18 02:40:00 +01:00
2017-12-03 05:46:47 +01:00
2020-01-17 23:46:37 -05:00
2019-11-27 13:33:43 +00:00
2018-07-13 10:13:00 +02:00
2019-11-27 13:33:43 +00:00
2017-11-04 00:07:13 +01:00
2020-05-31 17:09:23 +02:00
2020-04-05 23:43:41 -04:00
2018-02-06 01:16:32 -05:00
2019-11-27 13:33:43 +00:00
2016-08-23 21:01:44 +02:00
2020-05-19 13:07:38 -07:00
2018-02-06 01:16:32 -05:00
2019-11-27 13:33:43 +00:00
2016-08-23 21:01:44 +02:00
2020-05-31 18:14:14 +00:00
2020-05-29 09:26:50 -04:00
2020-05-28 11:00:03 +03:00
2019-11-27 13:33:43 +00:00
2020-05-29 09:26:50 -04:00
2020-05-11 19:26:20 +02:00
2020-05-17 17:51:03 -04:00
2020-02-21 00:51:02 -05:00
2020-05-12 18:44:21 +01:00
2020-04-03 15:30:56 +01:00
2020-03-12 14:56:21 -04:00
2020-05-11 19:26:20 +02:00
2019-11-27 13:33:43 +00:00
2018-04-24 23:16:58 +02:00
2020-05-11 19:26:20 +02:00
2020-03-02 04:43:56 +01:00
2020-03-02 04:43:56 +01:00
2019-05-21 10:32:08 -05:00
2019-11-27 13:33:43 +00:00
2020-06-01 10:49:33 +01:00
2020-05-05 08:20:09 +02:00
2020-06-01 10:49:33 +01:00
2020-05-28 15:13:07 +02:00
2019-11-27 13:33:43 +00:00
2020-06-05 11:30:47 +02:00
2018-03-29 05:02:15 +02:00
2020-05-28 15:13:07 +02:00
2018-02-06 01:16:32 -05:00
2019-11-27 13:33:43 +00:00
2020-05-26 20:43:47 -04:00
2020-02-14 05:41:01 +11:00
2019-11-27 13:33:43 +00:00
2019-04-25 11:35:00 +02:00
2018-01-14 17:05:04 -05:00
2019-01-23 22:33:44 -05:00
2019-11-27 13:33:43 +00:00
2018-03-18 05:57:07 +01:00
2020-05-26 20:43:47 -04:00
2020-05-06 13:15:45 -04:00
2020-04-06 16:32:03 -04:00
2020-04-30 13:05:52 -04:00
2019-02-06 10:39:27 +01:00
2019-02-06 10:39:27 +01:00
2017-12-15 07:44:58 -05:00
2019-05-28 19:19:24 +02:00
2018-04-28 16:22:29 -04:00
2019-11-27 13:33:43 +00:00
2018-03-18 05:57:07 +01:00
2020-05-17 07:32:37 +02:00
2020-01-30 21:33:37 +01:00
2020-05-17 07:10:34 +02:00
2020-05-30 19:26:46 -04:00
2020-05-11 19:26:20 +02:00
2018-03-20 15:14:10 +01:00
2019-11-27 13:33:43 +00:00
2018-05-06 02:10:20 +02:00
2017-12-03 05:46:47 +01:00
2019-09-13 11:07:56 +02:00
2019-11-27 13:33:43 +00:00
2020-05-11 19:26:20 +02:00
2020-03-11 19:35:55 -04:00
2020-03-11 19:35:55 -04:00
2020-02-21 21:55:16 +01:00
2020-03-11 19:35:55 -04:00
2020-02-12 13:36:04 +01:00
2020-02-12 11:25:34 +01:00
2018-02-06 01:16:32 -05:00
2019-11-27 13:33:43 +00:00
2020-05-31 17:09:23 +02:00
2020-01-26 18:21:07 +01:00
2020-03-05 07:56:28 +01:00
2020-02-21 00:51:02 -05:00
2020-02-22 08:11:34 -05:00
2020-02-24 19:07:03 -05:00
2016-04-06 15:43:29 +02:00
2020-02-22 08:11:34 -05:00
2018-03-18 19:21:33 +01:00
2019-11-27 13:33:43 +00:00
2018-03-18 19:21:33 +01:00
2020-05-31 17:09:23 +02:00
2020-05-17 19:15:46 +00:00
2020-05-17 17:51:03 -04:00
2020-05-12 18:43:56 +01:00
2020-01-26 18:21:07 +01:00
2018-03-12 17:21:45 +01:00
2020-05-28 11:00:03 +03:00
2020-05-17 12:41:16 -04:00
2020-04-13 09:29:11 -04:00
2020-03-12 14:44:03 -04:00
2020-05-17 14:15:06 -04:00
2020-05-26 20:05:34 -04:00
2019-11-27 13:33:43 +00:00
2020-05-28 11:00:03 +03:00
2019-11-27 13:33:43 +00:00
2018-01-21 15:23:17 +01:00
2020-04-26 14:41:52 -04:00
2017-10-09 20:33:14 +02:00
2017-10-09 20:33:14 +02:00
2020-03-12 14:56:21 -04:00