mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
render/pixel_format: introduce pixel format info table
This commit is contained in:
parent
d9cae04ffc
commit
5fd82c6f54
3 changed files with 54 additions and 0 deletions
23
include/render/pixel_format.h
Normal file
23
include/render/pixel_format.h
Normal file
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue