Skip to content

WIP: renderer-native: Simplify page flip counting.

Daniel van Vugt requested to merge vanvugt/mutter:count-differently into master

Eliminate two fields of MetaOnscreenNative:

  • total_pending_flips
  • pending_queue_swap_notify

This is necessary to support future asynchronous page flipping in which a condition we currently test for total_pending_flips == 0 might never be true during constant rendering.

Turns out we already kept enough counting information in pending_..._notify_frame_count to not need the deleted fields anyway. So instead of waiting for total_pending_flips == 0, we only need to wait for specific invocations of flip_closure_destroyed where the two counts are different to know that a global frame has been completed for all CRTCs.

This was only intended to unblock work on !73 (closed), but has two additional unexpected happy consequences:

  • fb_in_use is now truly unused and can be removed; and
  • this is less code.
Edited by Daniel van Vugt

Merge request reports