aboutsummaryrefslogtreecommitdiff
path: root/include/wlr/interfaces
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-10-05 16:14:22 +0200
committeremersion <contact@emersion.fr>2018-10-05 16:18:37 +0200
commitba9142274765869cd58ec0c55e7ef8da0354ed25 (patch)
treecde3e0b96176c394a8464dcf6f8c0df17ed1923c /include/wlr/interfaces
parent4e89a2139749c996d0c3ef6da5042d0a3cd9c9e6 (diff)
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
Diffstat (limited to 'include/wlr/interfaces')
-rw-r--r--include/wlr/interfaces/wlr_output.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/wlr/interfaces/wlr_output.h b/include/wlr/interfaces/wlr_output.h
index 52581768..da37cba1 100644
--- a/include/wlr/interfaces/wlr_output.h
+++ b/include/wlr/interfaces/wlr_output.h
@@ -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,