mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
output: don't trigger a frame immediately in schedule_frame
This desynchronizes our rendering loop with the vblank cycle. In case a compositor doesn't swap buffers but schedules a frame, emitting a frame event immediately enters a busy-loop. Instead, ask the backend to send a frame when appropriate. On Wayland we can just register a frame callback on our surface. On DRM we can do a no-op pageflip. Fixes #617 Fixes swaywm/sway#2748
This commit is contained in:
parent
4e89a21397
commit
ba91422747
4 changed files with 63 additions and 3 deletions
|
|
@ -33,6 +33,7 @@ struct wlr_output_impl {
|
|||
size_t (*get_gamma_size)(struct wlr_output *output);
|
||||
bool (*export_dmabuf)(struct wlr_output *output,
|
||||
struct wlr_dmabuf_attributes *attribs);
|
||||
void (*schedule_frame)(struct wlr_output *output);
|
||||
};
|
||||
|
||||
void wlr_output_init(struct wlr_output *output, struct wlr_backend *backend,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue