render/pixel-format: drop unnecessary fields in the table

DRM_FORMAT_INVALID is zero. Let's just omit the fields to make the
table more readable.
This commit is contained in:
Simon Ser 2022-11-30 14:33:52 +01:00
parent e97ce5f459
commit e31c741d2a

View File

@ -6,9 +6,7 @@
static const struct wlr_pixel_format_info pixel_format_info[] = {
{
.drm_format = DRM_FORMAT_XRGB8888,
.opaque_substitute = DRM_FORMAT_INVALID,
.bpp = 32,
.has_alpha = false,
},
{
.drm_format = DRM_FORMAT_ARGB8888,
@ -18,9 +16,7 @@ static const struct wlr_pixel_format_info pixel_format_info[] = {
},
{
.drm_format = DRM_FORMAT_XBGR8888,
.opaque_substitute = DRM_FORMAT_INVALID,
.bpp = 32,
.has_alpha = false,
},
{
.drm_format = DRM_FORMAT_ABGR8888,
@ -30,9 +26,7 @@ static const struct wlr_pixel_format_info pixel_format_info[] = {
},
{
.drm_format = DRM_FORMAT_RGBX8888,
.opaque_substitute = DRM_FORMAT_INVALID,
.bpp = 32,
.has_alpha = false,
},
{
.drm_format = DRM_FORMAT_RGBA8888,
@ -42,9 +36,7 @@ static const struct wlr_pixel_format_info pixel_format_info[] = {
},
{
.drm_format = DRM_FORMAT_BGRX8888,
.opaque_substitute = DRM_FORMAT_INVALID,
.bpp = 32,
.has_alpha = false,
},
{
.drm_format = DRM_FORMAT_BGRA8888,
@ -66,15 +58,11 @@ static const struct wlr_pixel_format_info pixel_format_info[] = {
},
{
.drm_format = DRM_FORMAT_BGR888,
.opaque_substitute = DRM_FORMAT_INVALID,
.bpp = 24,
.has_alpha = false,
},
{
.drm_format = DRM_FORMAT_RGBX4444,
.opaque_substitute = DRM_FORMAT_INVALID,
.bpp = 16,
.has_alpha = false,
},
{
.drm_format = DRM_FORMAT_RGBA4444,
@ -94,9 +82,7 @@ static const struct wlr_pixel_format_info pixel_format_info[] = {
},
{
.drm_format = DRM_FORMAT_RGBX5551,
.opaque_substitute = DRM_FORMAT_INVALID,
.bpp = 16,
.has_alpha = false,
},
{
.drm_format = DRM_FORMAT_RGBA5551,
@ -126,21 +112,15 @@ static const struct wlr_pixel_format_info pixel_format_info[] = {
},
{
.drm_format = DRM_FORMAT_RGB565,
.opaque_substitute = DRM_FORMAT_INVALID,
.bpp = 16,
.has_alpha = false,
},
{
.drm_format = DRM_FORMAT_BGR565,
.opaque_substitute = DRM_FORMAT_INVALID,
.bpp = 16,
.has_alpha = false,
},
{
.drm_format = DRM_FORMAT_XRGB2101010,
.opaque_substitute = DRM_FORMAT_INVALID,
.bpp = 32,
.has_alpha = false,
},
{
.drm_format = DRM_FORMAT_ARGB2101010,
@ -150,9 +130,7 @@ static const struct wlr_pixel_format_info pixel_format_info[] = {
},
{
.drm_format = DRM_FORMAT_XBGR2101010,
.opaque_substitute = DRM_FORMAT_INVALID,
.bpp = 32,
.has_alpha = false,
},
{
.drm_format = DRM_FORMAT_ABGR2101010,
@ -162,9 +140,7 @@ static const struct wlr_pixel_format_info pixel_format_info[] = {
},
{
.drm_format = DRM_FORMAT_XBGR16161616F,
.opaque_substitute = DRM_FORMAT_INVALID,
.bpp = 64,
.has_alpha = false,
},
{
.drm_format = DRM_FORMAT_ABGR16161616F,
@ -174,9 +150,7 @@ static const struct wlr_pixel_format_info pixel_format_info[] = {
},
{
.drm_format = DRM_FORMAT_XBGR16161616,
.opaque_substitute = DRM_FORMAT_INVALID,
.bpp = 64,
.has_alpha = false,
},
{
.drm_format = DRM_FORMAT_ABGR16161616,