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 committed by Kenny Levinsen
parent ad145dce86
commit ee100e2586
2 changed files with 77 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.