summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Mader <robert.mader@posteo.de>2023-02-10 19:01:45 +0100
committerRobert Mader <robert.mader@posteo.de>2023-02-10 19:01:45 +0100
commit516ff7b7e49d1aaad9f4f7a2d92cda8be1549083 (patch)
treeabb95b5df5e70a9381aaf3b587a93e6d5a216d75
parent4ed03b9bc83f343123a212699db80a22ec17bc21 (diff)
downloadmutter-516ff7b7e49d1aaad9f4f7a2d92cda8be1549083.tar.gz
Revert "clutter/frame-clock: Fix handling of equal next_presentation_time_us"
This reverts commit 1f7527bbc4d74cbb4d79c7e21e549ef984b36e3a. Not waiting till the next refresh cycle can cause feedback loops with Wayland clients using "empty" commits for frame events - notably Firefox, but possibly many other clients as well under certain conditions. While for Gnome 44 a more sophisticated solution is in development, lets go with a simple and tested one for Gnome 43, going back to Gnome 42 behavior, slightly increasing the chance for frame skips. Related: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6137
-rw-r--r--clutter/clutter/clutter-frame-clock.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/clutter/clutter/clutter-frame-clock.c b/clutter/clutter/clutter-frame-clock.c
index 4d441c364..34d676f54 100644
--- a/clutter/clutter/clutter-frame-clock.c
+++ b/clutter/clutter/clutter-frame-clock.c
@@ -530,8 +530,7 @@ calculate_next_update_time_us (ClutterFrameClock *frame_clock,
last_next_presentation_time_us = frame_clock->next_presentation_time_us;
time_since_last_next_presentation_time_us =
next_presentation_time_us - last_next_presentation_time_us;
- if (time_since_last_next_presentation_time_us > 0 &&
- time_since_last_next_presentation_time_us < (refresh_interval_us / 2))
+ if (time_since_last_next_presentation_time_us < (refresh_interval_us / 2))
{
next_presentation_time_us =
frame_clock->next_presentation_time_us + refresh_interval_us;