color-management-v1: add support for mastering display metadata

This commit is contained in:
Simon Ser 2025-01-24 17:31:50 +01:00
parent dcf38e3ea9
commit 95c85af87c
2 changed files with 95 additions and 7 deletions

View file

@ -10,6 +10,7 @@
#define WLR_TYPES_WLR_COLOR_MANAGEMENT_V1_H
#include <wayland-server.h>
#include <wlr/render/color.h>
#include "color-management-v1-protocol.h"
@ -19,6 +20,14 @@ struct wlr_image_description_v1_data {
uint32_t tf_named; // enum wp_color_manager_v1_transfer_function, zero if unset
uint32_t primaries_named; // enum wp_color_manager_v1_primaries, zero if unset
bool has_mastering_display_primaries;
struct wlr_color_primaries mastering_display_primaries;
bool has_mastering_luminance;
struct {
float min, max; // cd/m²
} mastering_luminance;
uint32_t max_cll, max_fall; // cd/m², zero if unset
};