mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-15 06:59:43 -05:00
output: check buffer in wlr_output_test
Check that buffer can be scanned out in wlr_output_test instead of wlr_output_attach_buffer. This allows the backend to have access to the whole pending state when performing the check. This brings the wlr_output API more in line with the KMS API. This removes the need for wlr_output_attach_buffer to return a value, and for wlr_output_impl.attach_buffer.
This commit is contained in:
parent
e041158988
commit
6977f3a843
7 changed files with 122 additions and 115 deletions
|
|
@ -28,7 +28,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 (*attach_buffer)(struct wlr_output *output, struct wlr_buffer *buffer);
|
||||
};
|
||||
|
||||
void wlr_output_init(struct wlr_output *output, struct wlr_backend *backend,
|
||||
|
|
|
|||
|
|
@ -314,8 +314,11 @@ bool wlr_output_attach_render(struct wlr_output *output, int *buffer_age);
|
|||
/**
|
||||
* Attach a buffer to the output. Compositors should call `wlr_output_commit`
|
||||
* to submit the new frame. The output needs to be enabled.
|
||||
*
|
||||
* Not all backends support direct scan-out on all buffers. Compositors can
|
||||
* check whether a buffer is supported by calling `wlr_output_test`.
|
||||
*/
|
||||
bool wlr_output_attach_buffer(struct wlr_output *output,
|
||||
void wlr_output_attach_buffer(struct wlr_output *output,
|
||||
struct wlr_buffer *buffer);
|
||||
/**
|
||||
* Get the preferred format for reading pixels.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue