get_update_time was returning
-1 in some cases even if
was called prior. So the master clock was overshooting the correct update
time and missing some frames. This seems to be happening most under moderate
CPU load (gnome-shell#1411 (closed)), but not so high a load as to justify the frame
skips that were occurring.
The reason for
-1 in these cases was because
it was considered impossible to calculate the next update time while
pending_swaps > 0. That's not completely true. We know if
pending_swaps == 1 then
schedule_update should schedule one frame later.
So just factor
-1 in these cases so we're more likely to render the next
frame (or move the cursor) at the correct time.
Closes: gnome-shell#1411 (closed)
Prerequisite (just FYI for backporters): !216 (merged)