mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-02 11:55:59 +01:00
348f52b5fc
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 |
||
---|---|---|
.. | ||
data_device | ||
seat | ||
tablet_v2 | ||
xdg_shell | ||
xdg_shell_v6 | ||
meson.build | ||
wlr_box.c | ||
wlr_buffer.c | ||
wlr_compositor.c | ||
wlr_cursor.c | ||
wlr_data_control_v1.c | ||
wlr_export_dmabuf_v1.c | ||
wlr_foreign_toplevel_management_v1.c | ||
wlr_fullscreen_shell_v1.c | ||
wlr_gamma_control_v1.c | ||
wlr_gtk_primary_selection.c | ||
wlr_idle.c | ||
wlr_idle_inhibit_v1.c | ||
wlr_input_device.c | ||
wlr_input_inhibitor.c | ||
wlr_input_method_v2.c | ||
wlr_keyboard.c | ||
wlr_keyboard_group.c | ||
wlr_keyboard_shortcuts_inhibit_v1.c | ||
wlr_layer_shell_v1.c | ||
wlr_linux_dmabuf_v1.c | ||
wlr_list.c | ||
wlr_matrix.c | ||
wlr_output.c | ||
wlr_output_damage.c | ||
wlr_output_layout.c | ||
wlr_output_management_v1.c | ||
wlr_output_power_management_v1.c | ||
wlr_pointer.c | ||
wlr_pointer_constraints_v1.c | ||
wlr_pointer_gestures_v1.c | ||
wlr_presentation_time.c | ||
wlr_primary_selection.c | ||
wlr_primary_selection_v1.c | ||
wlr_region.c | ||
wlr_relative_pointer_v1.c | ||
wlr_screencopy_v1.c | ||
wlr_server_decoration.c | ||
wlr_surface.c | ||
wlr_switch.c | ||
wlr_tablet_pad.c | ||
wlr_tablet_tool.c | ||
wlr_text_input_v3.c | ||
wlr_touch.c | ||
wlr_virtual_keyboard_v1.c | ||
wlr_virtual_pointer_v1.c | ||
wlr_xcursor_manager.c | ||
wlr_xdg_decoration_v1.c | ||
wlr_xdg_output_v1.c |