pixel-formats: Add internal-only format flag

Add a new hide_from_clients flag which, if set, specifies that the
format is only for internal information and processing, and should not
be advertised for clients.

This will be used for formats like R8 and GR88, which are not useful for
client buffers, but are used internally to implement YUV -> RGB
conversion.

Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
Daniel Stone
2022-04-28 01:44:19 +01:00
committed by Pekka Paalanen
parent 32ee42d261
commit 1db2fbef61
3 changed files with 10 additions and 3 deletions
+4 -1
View File
@@ -2796,7 +2796,10 @@ populate_supported_formats(struct weston_compositor *ec,
return 0;
for (i = 0; i < num_formats; i++) {
if (!pixel_format_get_info(formats[i]))
const struct pixel_format_info *info =
pixel_format_get_info(formats[i]);
if (!info || info->hide_from_clients)
continue;
fmt = weston_drm_format_array_add_format(supported_formats,