color: add output color transform API

This is the blending space to monitor space color transform. It needs to
be implemented in the renderers, unless a backend sets
from_blend_to_output_by_backend = true, in which case the backend does
it and the renderer does not.

The intention is that from_blend_to_output_by_backend can be toggled
frame by frame to allow backends to react to dynamic change of output
color profile.

For now, renderers just assert that they don't need to do anything for
output color transform.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
Pekka Paalanen
2021-02-25 12:03:28 +02:00
committed by Pekka Paalanen
parent 90a5ffa097
commit 1d2eee208c
6 changed files with 65 additions and 0 deletions
+3
View File
@@ -79,6 +79,7 @@ struct linux_dmabuf_buffer;
struct weston_recorder;
struct weston_pointer_constraint;
struct ro_anonymous_file;
struct weston_color_transform;
enum weston_keyboard_modifier {
MODIFIER_CTRL = (1 << 0),
@@ -373,6 +374,8 @@ struct weston_output {
int scale;
bool use_renderer_shadow_buffer;
struct weston_color_transform *from_blend_to_output;
bool from_blend_to_output_by_backend;
int (*enable)(struct weston_output *output);
int (*disable)(struct weston_output *output);