This adds an option to program basic display color characteristics from weston.ini. In the future there will be a way to set this information from EDID, but because EDID is unreliable that will probably not be the default. An ICC profile will likely override most or all of this. The main reason to add this option is to be able to characterise HDR monitors. An 'output' section can have a key 'color_characteristics' (string) set to a name. The name refers to any 'color_characteristics' section with 'name' set to the same string. The 'name' key of a 'color_characteristics' section cannot contain a colon ':'. Names with colon in 'output' section key 'color_characteristics' value are reserved for future use, e.g. to indicate that the metadata is to be taken from EDID instead of a weston.ini section. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>dev
parent
3696d9b6a1
commit
518d72a37b
@ -0,0 +1,34 @@ |
||||
/*
|
||||
* Copyright 2022 Collabora, Ltd. |
||||
* |
||||
* Permission is hereby granted, free of charge, to any person obtaining |
||||
* a copy of this software and associated documentation files (the |
||||
* "Software"), to deal in the Software without restriction, including |
||||
* without limitation the rights to use, copy, modify, merge, publish, |
||||
* distribute, sublicense, and/or sell copies of the Software, and to |
||||
* permit persons to whom the Software is furnished to do so, subject to |
||||
* the following conditions: |
||||
* |
||||
* The above copyright notice and this permission notice (including the |
||||
* next paragraph) shall be included in all copies or substantial |
||||
* portions of the Software. |
||||
* |
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS |
||||
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN |
||||
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
||||
* SOFTWARE. |
||||
*/ |
||||
|
||||
#pragma once |
||||
|
||||
#include <libweston/libweston.h> |
||||
#include <libweston/config-parser.h> |
||||
|
||||
int |
||||
wet_output_set_color_characteristics(struct weston_output *output, |
||||
struct weston_config *wc, |
||||
struct weston_config_section *section); |
Loading…
Reference in new issue