diff options
author | Simon Zeni <simon@bl4ckb0ne.ca> | 2021-03-15 12:29:29 -0400 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2021-03-25 10:55:54 +0100 |
commit | 5fd82c6f54685e6bdc354b4f639bdfc52539e12f (patch) | |
tree | 8c16e1fa4068e9768900254aea7fb7381054fd1f /include | |
parent | d9cae04ffc3140408f2604eeff7d4776fe8d9548 (diff) |
render/pixel_format: introduce pixel format info table
Diffstat (limited to 'include')
-rw-r--r-- | include/render/pixel_format.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/render/pixel_format.h b/include/render/pixel_format.h new file mode 100644 index 00000000..8814bd82 --- /dev/null +++ b/include/render/pixel_format.h @@ -0,0 +1,23 @@ +#ifndef RENDER_PIXEL_FORMAT_H +#define RENDER_PIXEL_FORMAT_H + +#include <wayland-server-protocol.h> + +struct wlr_pixel_format_info { + uint32_t drm_format; + + /* Equivalent of the format if it has an alpha channel, + * DRM_FORMAT_INVALID (0) if NA + */ + uint32_t opaque_substitute; + + /* Bits per pixels */ + uint32_t bpp; + + /* True if the format has an alpha channel */ + bool has_alpha; +}; + +const struct wlr_pixel_format_info *drm_get_pixel_format_info(uint32_t fmt); + +#endif |