diff options
author | Simon Ser <contact@emersion.fr> | 2020-12-01 16:21:10 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2021-06-07 15:42:38 +0200 |
commit | 4d603826c811883f656be61743e499831541fede (patch) | |
tree | 0fed5c48aedc35af548d9a07f8ac06dd0ae68a9f /include/wlr/interfaces/wlr_output.h | |
parent | 534615cd557567571eaef8b4edf4818c52ee1da7 (diff) |
output: add get_primary_formats to interface
This function returns the set of formats the backend can use for the
primary buffer. It can be used to allocate a buffer suitable for
scan-out.
Diffstat (limited to 'include/wlr/interfaces/wlr_output.h')
-rw-r--r-- | include/wlr/interfaces/wlr_output.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/wlr/interfaces/wlr_output.h b/include/wlr/interfaces/wlr_output.h index aef41367..c74ea156 100644 --- a/include/wlr/interfaces/wlr_output.h +++ b/include/wlr/interfaces/wlr_output.h @@ -94,6 +94,15 @@ struct wlr_output_impl { * size for the cursor may fail. */ void (*get_cursor_size)(struct wlr_output *output, int *width, int *height); + /** + * Get the list of DMA-BUF formats suitable for the primary buffer, + * assuming a buffer with the specified capabilities. + * + * If unimplemented, the primary buffer has no format constraint. If NULL + * is returned, no format is suitable. + */ + const struct wlr_drm_format_set *(*get_primary_formats)( + struct wlr_output *output, uint32_t buffer_caps); }; /** |