mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
render: introduce wlr_drm_format_set
This types adds a container for formats + modifiers. A list that is of [format [modifier]] was chosen instead of [format modifer] because that is how GBM accepts them. Co-Authored-By: emersion <contact@emersion.fr>
This commit is contained in:
parent
08454adada
commit
c01b81c99c
4 changed files with 136 additions and 2 deletions
27
include/wlr/render/drm_format_set.h
Normal file
27
include/wlr/render/drm_format_set.h
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#ifndef WLR_RENDER_DRM_FORMAT_SET_H
|
||||
#define WLR_RENDER_DRM_FORMAT_SET_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
struct wlr_drm_format {
|
||||
uint32_t format;
|
||||
size_t len, cap;
|
||||
uint64_t modifiers[];
|
||||
};
|
||||
|
||||
struct wlr_drm_format_set {
|
||||
size_t len, cap;
|
||||
struct wlr_drm_format **formats;
|
||||
};
|
||||
|
||||
void wlr_drm_format_set_finish(struct wlr_drm_format_set *set);
|
||||
|
||||
const struct wlr_drm_format *wlr_drm_format_set_get(
|
||||
const struct wlr_drm_format_set *set, uint32_t format);
|
||||
|
||||
bool wlr_drm_format_set_add(struct wlr_drm_format_set *set, uint32_t format,
|
||||
uint64_t modifier);
|
||||
|
||||
#endif
|
||||
|
|
@ -1,9 +1,10 @@
|
|||
install_headers(
|
||||
'dmabuf.h',
|
||||
'egl.h',
|
||||
'drm_format_set.h',
|
||||
'gles2.h',
|
||||
'interface.h',
|
||||
'wlr_renderer.h',
|
||||
'wlr_texture.h',
|
||||
subdir: 'wlr/render'
|
||||
subdir: 'wlr/render',
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue