Skip to content

clutter-frame-clock: Remove ClutterFrameClockState

Daniel van Vugt requested to merge vanvugt/mutter:remove-clock-state into master

This simplification is possible because all but one state are known by other means already:

  • INIT: frame_count == 0 && g_source_get_ready_time () == -1
  • SCHEDULED: g_source_get_ready_time () != -1
  • DISPATCHING: merged into PENDING_PRESENTED
  • PENDING_PRESENTED: int presenting
  • IDLE: !presenting && g_source_get_ready_time () == -1

Dispatching counts as presenting because in the synchronous driver case (and conformance tests) the presented callback might be called in the middle of the dispatch function. Although in most cases the presented callback occurs after the dispatch function.

This change is also necessary to support future multi-buffering where one or more presentations may be in progress at the same time as scheduling and dispatching the next frame. And multi-buffering is required to enable frequency scaling, where mutter currently sticks to the minimum GPU frequency and drops its frame rate instead of ever scaling up.

Edited by Daniel van Vugt

Merge request reports