chase wlroots: Add support for HDR10 output

v2: Switch XRGB to XBGR
v3: Rewrite HDR mode checking and setting
v4: Restructure HDR support detection
v5: Fix code style
v6: Fix old style function declaration
v7: This function should be declared static
v8: This helper function can accept a const struct on input
v9: Rebase now that 0.20 is merged
v10: Rewrite with multiple color format attempts
v11: Add in the parts that accidentally got left in my
     original color-management-v1 patch
v12: Add missing function prototype
This commit is contained in:
Christopher Snowhill 2026-03-29 23:52:38 -07:00
parent c5ea41e876
commit be94b60834
5 changed files with 211 additions and 0 deletions

View file

@ -24,6 +24,10 @@ output_state_init(struct output *output)
backup_config, output->wlr_output);
wlr_output_head_v1_state_apply(&backup_head->state, &output->pending);
/* This must be applied outside of config */
output_state_setup_hdr(output, true);
wlr_output_configuration_v1_destroy(backup_config);
}
@ -35,6 +39,7 @@ output_state_commit(struct output *output)
if (committed) {
wlr_output_state_finish(&output->pending);
wlr_output_state_init(&output->pending);
output_state_setup_hdr(output, true); /* So must this */
} else {
wlr_log(WLR_ERROR, "Failed to commit frame");
}