Skip to content

clutter-stage-cogl: Don't skip past the next frame [performance]

The ideal update_time is sometimes only a couple of milliseconds ago. When this is true, the ideal update time is still just that and we have a chance of still making the next frame deadline if we start immediately. So instead of blindly skipping a frame, try to render it instead.

The reason nobody noticed these missed frames very often was because the bug has two accidental workarounds built-in:

  • Frames were being over-scheduled with triple buffering. This avoided the missed frames by prerendering them more than intended (#334 (closed)).

  • sync_delay is presently high enough (2ms) to push the update_time past now, thus often avoiding the erroneous while loop.

The clutter master clock already supports update times in the past just fine, so let's tell the truth and emit those when it really is the ideal update time (when to start rendering the next frame).

Edited by Jeff Fortin

Merge request reports