libweston: add weston_output::color_profile
Add API to set an output's color profile. This new function can also be called while the output is enabled. This allows changing the output color profile even at runtime if desired. color-noop has no way of creating weston_color_profile objects, so it just asserts that no color profile is set. color-lcms does not yet implement taking the output color profile into account, so for now it just fails everything if a profile is set. weston_surface_color_transform_fini() was previously used only prior to freeing the struct, but now it is used also to just clear the struct, hence it needs to reset the fields. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
committed by
Pekka Paalanen
parent
9a0aa37edd
commit
9a9e6ced1b
@@ -374,6 +374,7 @@ struct weston_output {
|
||||
bool enabled; /**< is in the output_list, not pending list */
|
||||
int scale;
|
||||
|
||||
struct weston_color_profile *color_profile;
|
||||
struct weston_color_transform *from_sRGB_to_output;
|
||||
struct weston_color_transform *from_sRGB_to_blend;
|
||||
struct weston_color_transform *from_blend_to_output;
|
||||
@@ -2083,6 +2084,10 @@ void
|
||||
weston_output_set_transform(struct weston_output *output,
|
||||
uint32_t transform);
|
||||
|
||||
bool
|
||||
weston_output_set_color_profile(struct weston_output *output,
|
||||
struct weston_color_profile *cprof);
|
||||
|
||||
void
|
||||
weston_output_init(struct weston_output *output,
|
||||
struct weston_compositor *compositor,
|
||||
|
||||
Reference in New Issue
Block a user