Add interval frame scheduler

Headless present events aren't suitable for the present scheduler.
This new scheduler is a good place for headless' existing frame logic to
go, so move it into there.
With this decoupling, there's nothing tying the scheduler to the
headless backend, hence the generic name.
This commit is contained in:
Rose Hudson 2023-08-09 17:42:56 +01:00
parent be9622aba0
commit 5fd3dc7fca
2 changed files with 76 additions and 0 deletions

View file

@ -42,6 +42,11 @@ struct wlr_frame_scheduler *wlr_present_scheduler_create(struct wlr_output *outp
* render loop, it emits the frame signal when the compositor's event loop is idle.
*/
struct wlr_frame_scheduler *wlr_wl_scheduler_create(struct wlr_output *output);
/**
* The interval scheduler maintains a render loop based on a timer. To wake the render loop, it
* emits the frame signal when the compositor's event loop is idle.
*/
struct wlr_frame_scheduler *wlr_interval_scheduler_create(struct wlr_output *output);
/**
* Creates an appropriate frame scheduler for the given output's backend capabilities.