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>
diff --git a/libweston/compositor.c b/libweston/compositor.c
index 3f4f4b0..e5fcac3 100644
--- a/libweston/compositor.c
+++ b/libweston/compositor.c
@@ -6274,6 +6274,8 @@
 {
 	weston_color_transform_unref(output->from_sRGB_to_output);
 	output->from_sRGB_to_output = NULL;
+	weston_color_transform_unref(output->from_sRGB_to_blend);
+	output->from_sRGB_to_blend = NULL;
 	weston_color_transform_unref(output->from_blend_to_output);
 	output->from_blend_to_output = NULL;
 }
@@ -6691,6 +6693,8 @@
 					    &output->from_blend_to_output);
 	ok = ok && cm->get_sRGB_to_output_color_transform(cm, output,
 							  &output->from_sRGB_to_output);
+	ok = ok && cm->get_sRGB_to_blend_color_transform(cm, output,
+							 &output->from_sRGB_to_blend);
 	if (!ok) {
 		weston_log("Creating color transformation for output \"%s\" failed.\n",
 			   output->name);