color: add from sRGB to blending color transformation

This is needed when the compositor produces any content internally:
- the lines in triangle fan debug
- the censoring color fill (unmet HDCP requirements)

Solid color surfaces do not need this special-casing because
weston_surface is supposed to carry color space information, which will
get used in gl_shader_config_init_for_view().

This makes sure the internally produced graphics fit in, e.g on a
monitor in HDR mode.

For now, just ensure there is an identity transformation. Actual
implementations in GL-renderer will follow later.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
Pekka Paalanen
2021-03-23 13:40:43 +02:00
committed by Pekka Paalanen
parent cda3951a9a
commit 8fb23ed110
5 changed files with 39 additions and 0 deletions
+3
View File
@@ -1034,6 +1034,9 @@ draw_paint_node(struct weston_paint_node *pnode,
else
filter = GL_NEAREST;
/* for triangle_fan_debug(), maybe_censor_override() */
assert(pnode->output->from_sRGB_to_blend == NULL);
if (!gl_shader_config_init_for_paint_node(&sconf, pnode, filter))
goto out;