mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
output: add transfer function to image description
This commit is contained in:
parent
4470683591
commit
dc258b2237
2 changed files with 8 additions and 0 deletions
|
|
@ -89,9 +89,12 @@ enum wlr_output_state_mode_type {
|
|||
* Carries information about the color encoding used for a struct wlr_buffer.
|
||||
*
|
||||
* Supported primaries are advertised in wlr_output.supported_primaries.
|
||||
* Supported transfer functions are advertised in
|
||||
* wlr_output.supported_transfer_functions.
|
||||
*/
|
||||
struct wlr_output_image_description {
|
||||
enum wlr_color_named_primaries primaries;
|
||||
enum wlr_color_transfer_function transfer_function;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -182,6 +185,7 @@ struct wlr_output {
|
|||
int32_t refresh; // mHz, may be zero
|
||||
|
||||
uint32_t supported_primaries; // bitfield of enum wlr_color_named_primaries
|
||||
uint32_t supported_transfer_functions; // bitfield of enum wlr_color_transfer_function
|
||||
|
||||
bool enabled;
|
||||
float scale;
|
||||
|
|
|
|||
|
|
@ -679,6 +679,10 @@ static bool output_basic_test(struct wlr_output *output,
|
|||
wlr_log(WLR_DEBUG, "Unsupported image description primaries");
|
||||
return false;
|
||||
}
|
||||
if (!(output->supported_transfer_functions & state->image_description->transfer_function)) {
|
||||
wlr_log(WLR_DEBUG, "Unsupported image description transfer function");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue