1
0
Fork 0
mutter-performance-source/doc/clutter-frame-scheduling.md
Daniel van Vugt 68061c3581
clutter/frame-clock: Add triple buffering support
This replaces the DISPATCHED state with four new states that are possible
with triple buffering:

  DISPATCHED_ONE:                   Double buffering
  DISPATCHED_ONE_AND_SCHEDULED:     Scheduled switch to triple buffering
  DISPATCHED_ONE_AND_SCHEDULED_NOW: Scheduled switch to triple buffering
  DISPATCHED_TWO:                   Triple buffering

It's four states simply because you now have two booleans that are no
longer mutually exclusive: DISPATCHED and SCHEDULED.

(cherry picked from commit e323bc74b9abb3f694637848421237cf163594bc)
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1441>
Signed-off-by: Mingi Sung <sungmg@saltyming.net>
2024-10-22 17:11:02 +09:00

842 B

Clutter Frame scheduling

ClutterFrameClock state diagram.

stateDiagram
    INIT --> SCHEDULED/NOW : start first frame immediately
    IDLE --> SCHEDULED/NOW : given presentation time
    SCHEDULED/NOW --> IDLE : frame clock inhibited or mode changed
    SCHEDULED/NOW --> DISPATCHED_ONE : start a frame
    DISPATCHED_ONE --> IDLE : frame presented or aborted with nothing to draw
    DISPATCHED_ONE --> DISPATCHED_ONE_AND_SCHEDULED/NOW : entering triple buffering
    DISPATCHED_ONE_AND_SCHEDULED/NOW --> SCHEDULED/NOW : frame presented or aborted with nothing to draw
    DISPATCHED_ONE_AND_SCHEDULED/NOW --> DISPATCHED_ONE : frame clock inhibited or mode changed
    DISPATCHED_ONE_AND_SCHEDULED/NOW --> DISPATCHED_TWO : start a second concurrent frame
    DISPATCHED_TWO --> DISPATCHED_ONE : leaving triple buffering