aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2022-11-29 09:52:33 +0100
committerSimon Ser <contact@emersion.fr>2022-12-02 10:24:00 +0100
commite97ce5f459d871913d6540125fce32e62e85d2b0 (patch)
treefc7a06f86dbafaa2290c2a51e4f7205eb296f186
parentad165f7daf94dec5e7c91984bfffe122a1d2b8d7 (diff)
render/pixel-format: add various new formats
-rw-r--r--render/pixel_format.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/render/pixel_format.c b/render/pixel_format.c
index 330a59cc..f3d695d7 100644
--- a/render/pixel_format.c
+++ b/render/pixel_format.c
@@ -53,6 +53,18 @@ static const struct wlr_pixel_format_info pixel_format_info[] = {
.has_alpha = true,
},
{
+ .drm_format = DRM_FORMAT_R8,
+ .bpp = 8,
+ },
+ {
+ .drm_format = DRM_FORMAT_GR88,
+ .bpp = 16,
+ },
+ {
+ .drm_format = DRM_FORMAT_RGB888,
+ .bpp = 24,
+ },
+ {
.drm_format = DRM_FORMAT_BGR888,
.opaque_substitute = DRM_FORMAT_INVALID,
.bpp = 24,
@@ -71,6 +83,16 @@ static const struct wlr_pixel_format_info pixel_format_info[] = {
.has_alpha = true,
},
{
+ .drm_format = DRM_FORMAT_BGRX4444,
+ .bpp = 16,
+ },
+ {
+ .drm_format = DRM_FORMAT_BGRA4444,
+ .opaque_substitute = DRM_FORMAT_BGRX4444,
+ .bpp = 16,
+ .has_alpha = true,
+ },
+ {
.drm_format = DRM_FORMAT_RGBX5551,
.opaque_substitute = DRM_FORMAT_INVALID,
.bpp = 16,
@@ -83,6 +105,26 @@ static const struct wlr_pixel_format_info pixel_format_info[] = {
.has_alpha = true,
},
{
+ .drm_format = DRM_FORMAT_BGRX5551,
+ .bpp = 16,
+ },
+ {
+ .drm_format = DRM_FORMAT_BGRA5551,
+ .opaque_substitute = DRM_FORMAT_BGRX5551,
+ .bpp = 16,
+ .has_alpha = true,
+ },
+ {
+ .drm_format = DRM_FORMAT_XRGB1555,
+ .bpp = 16,
+ },
+ {
+ .drm_format = DRM_FORMAT_ARGB1555,
+ .opaque_substitute = DRM_FORMAT_XRGB1555,
+ .bpp = 16,
+ .has_alpha = true,
+ },
+ {
.drm_format = DRM_FORMAT_RGB565,
.opaque_substitute = DRM_FORMAT_INVALID,
.bpp = 16,