aboutsummaryrefslogtreecommitdiff
path: root/include/wlr/interfaces/wlr_output.h
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-03-02 13:26:53 +0100
committerDrew DeVault <sir@cmpwn.com>2020-03-04 03:22:19 +0100
commit348f52b5fc9be71bc22a6c0e00682667fb62374a (patch)
tree0b1d187177b5ce0fac0011d4e5d60ae5eee07465 /include/wlr/interfaces/wlr_output.h
parent613f9c6f8d1b50427430505c17275fd93f7afb18 (diff)
output: remove wlr_output_impl.schedule_frame
This function allowed backends to provide a custom function for frame scheduling. Before resuming the rendering loop, the DRM and Wayland backends would wait for vsync. There isn't a clear benefit of doing this. The only upside is that we get more stable timings: the delay between two repaints doesn't change too much and is close to a mutliple of the refresh rate. However this introduces latency, especially when a client misses a frame. For instance a fullscreen game missing vblank will need to wait more than a whole frame before being able to display new content. This worst case scenario happens as follows: - Client is still rendering its frame and cannot submit it in time - Deadline is reached - Compositor decides to stop the rendering loop since nothing changed on screen - Client finally manages to render its frame, submits it - Compositor calls wlr_output_schedule_frame - DRM backend waits for next vblank - The wlr_output frame event is fired, compositor draws new content on screen - On the second next vblank, the new content reaches the screen With this patch, the wlr_output frame event is fired immediately when the client submits its late frame. This change also makes it easier to support variable refresh rate, since VRR is all about being able to present too-late frames earlier. References: https://github.com/swaywm/wlroots/issues/1925
Diffstat (limited to 'include/wlr/interfaces/wlr_output.h')
-rw-r--r--include/wlr/interfaces/wlr_output.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/include/wlr/interfaces/wlr_output.h b/include/wlr/interfaces/wlr_output.h
index 8d4a3fd8..12980ee5 100644
--- a/include/wlr/interfaces/wlr_output.h
+++ b/include/wlr/interfaces/wlr_output.h
@@ -27,7 +27,6 @@ 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);
- bool (*schedule_frame)(struct wlr_output *output);
bool (*attach_buffer)(struct wlr_output *output, struct wlr_buffer *buffer);
};