[mutter] clutter/frame-clock: Comment common case of next presentation time
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] clutter/frame-clock: Comment common case of next presentation time
- Date: Fri, 5 Feb 2021 17:30:00 +0000 (UTC)
commit ed93a11de68c1ed475ded43f968c3ff6530736d4
Author: Ivan Molodetskikh <yalterz gmail com>
Date: Thu Feb 4 12:26:08 2021 +0300
clutter/frame-clock: Comment common case of next presentation time
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1707>
clutter/clutter/clutter-frame-clock.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
---
diff --git a/clutter/clutter/clutter-frame-clock.c b/clutter/clutter/clutter-frame-clock.c
index cd551091c2..6a32ea3d7c 100644
--- a/clutter/clutter/clutter-frame-clock.c
+++ b/clutter/clutter/clutter-frame-clock.c
@@ -246,6 +246,23 @@ calculate_next_update_time_us (ClutterFrameClock *frame_clock,
if (min_render_time_allowed_us > max_render_time_allowed_us)
min_render_time_allowed_us = max_render_time_allowed_us;
+ /*
+ * The common case is that the next presentation happens 1 refresh interval
+ * after the last presentation:
+ *
+ * last_presentation_time_us
+ * / next_presentation_time_us
+ * / /
+ * / /
+ * |--|--o----|-------|--> presentation times
+ * | | \ |
+ * | | now_us
+ * | \______/
+ * | refresh_interval_us
+ * |
+ * 0
+ *
+ */
last_presentation_time_us = frame_clock->last_presentation_time_us;
next_presentation_time_us = last_presentation_time_us + refresh_interval_us;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]