output: make attach_render and rollback_render optional

If these aren't provided by the backend, allocate a swapchain for the
output.
This commit is contained in:
Simon Ser 2020-12-01 16:22:42 +01:00
parent 233a2617cf
commit 1a06ea7750
3 changed files with 142 additions and 12 deletions

View file

@ -17,8 +17,7 @@
/**
* A backend implementation of wlr_output.
*
* The functions commit, attach_render and rollback_render are mandatory. Other
* functions are optional.
* The commit function is mandatory. Other functions are optional.
*/
struct wlr_output_impl {
/**

View file

@ -185,6 +185,9 @@ struct wlr_output {
struct wlr_buffer *cursor_front_buffer;
int software_cursor_locks; // number of locks forcing software cursors
struct wlr_swapchain *swapchain;
struct wlr_buffer *back_buffer;
struct wl_listener display_destroy;
void *data;