sway/commands/output: add color_profile "--device-primaries"

When a display is connected, create a color transform from its
self-reported color characteristics
This commit is contained in:
Félix Poisot 2025-12-05 21:51:54 +00:00 committed by Simon Ser
parent 776d445ec5
commit 26eb393d6d
4 changed files with 88 additions and 13 deletions

View file

@ -267,6 +267,12 @@ enum render_bit_depth {
RENDER_BIT_DEPTH_10,
};
enum color_profile {
COLOR_PROFILE_DEFAULT, // default is Transform with NULL color_transform
COLOR_PROFILE_TRANSFORM, // use color_transform from output_config
COLOR_PROFILE_TRANSFORM_WITH_DEVICE_PRIMARIES, // create transform from wlr_output
};
/**
* Size and position configuration for a particular output.
*
@ -288,7 +294,7 @@ struct output_config {
int max_render_time; // In milliseconds
int adaptive_sync;
enum render_bit_depth render_bit_depth;
bool set_color_transform;
enum color_profile color_profile;
struct wlr_color_transform *color_transform;
int allow_tearing;
int hdr;