mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
render: unify getter for texture formats
Instead of having separate getters for shm formats and DMA-BUF formats, use the same pattern as wlr_output_impl.get_primary_formats with a single function which takes buffer caps as input.
This commit is contained in:
parent
c63275d75e
commit
85c1eda721
12 changed files with 78 additions and 67 deletions
|
|
@ -50,11 +50,15 @@ struct wlr_renderer {
|
|||
struct wlr_renderer *wlr_renderer_autocreate(struct wlr_backend *backend);
|
||||
|
||||
/**
|
||||
* Get the shared-memory formats supporting import usage. Buffers allocated
|
||||
* with a format from this list may be imported via wlr_texture_from_pixels().
|
||||
* Get the formats supporting sampling usage.
|
||||
*
|
||||
* The buffer capabilities must be passed in.
|
||||
*
|
||||
* Buffers allocated with a format from this list may be passed to
|
||||
* wlr_texture_from_buffer().
|
||||
*/
|
||||
const uint32_t *wlr_renderer_get_shm_texture_formats(
|
||||
struct wlr_renderer *r, size_t *len);
|
||||
const struct wlr_drm_format_set *wlr_renderer_get_texture_formats(
|
||||
struct wlr_renderer *r, uint32_t buffer_caps);
|
||||
/**
|
||||
* Get the DMA-BUF formats supporting sampling usage. Buffers allocated with
|
||||
* a format from this list may be imported via wlr_texture_from_dmabuf().
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue