From e7b43ba3b4357e04c7a362972773756f8cce609b Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Tue, 23 Mar 2021 16:32:21 +0200 Subject: [PATCH] gl-renderer: color transform output borders Use the sRGB to output color space transformation when blitting the borders (decorations) into an output window (nested compositor). Nested output does not need to be sRGB anymore, as far as the decorations are concerned. Signed-off-by: Pekka Paalanen --- libweston/renderer-gl/gl-renderer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libweston/renderer-gl/gl-renderer.c b/libweston/renderer-gl/gl-renderer.c index 812435b7..dbebdd06 100644 --- a/libweston/renderer-gl/gl-renderer.c +++ b/libweston/renderer-gl/gl-renderer.c @@ -1294,7 +1294,6 @@ draw_output_borders(struct weston_output *output, .req = { .variant = SHADER_VARIANT_RGBA, .input_is_premult = true, - .color_pre_curve = SHADER_COLOR_CURVE_IDENTITY, }, .view_alpha = 1.0f, }; @@ -1306,7 +1305,10 @@ draw_output_borders(struct weston_output *output, if (border_status == BORDER_STATUS_CLEAN) return; /* Clean. Nothing to do. */ - assert(output->from_sRGB_to_output == NULL); + if (!gl_shader_config_set_color_transform(&sconf, output->from_sRGB_to_output)) { + weston_log("GL-renderer: %s failed to generate a color transformation.\n", __func__); + return; + } top = &go->borders[GL_RENDERER_BORDER_TOP]; bottom = &go->borders[GL_RENDERER_BORDER_BOTTOM];