From 23922eebf103809e3a3b9a3cd6e5d6d57cff7483 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 9 Aug 2024 22:37:21 -0400 Subject: [PATCH] gl: Handle text colors with color states Since we don't have proper color management here, just convert any color we meet to sRGB and hope for the best. --- gsk/gl/gskglrenderjob.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/gsk/gl/gskglrenderjob.c b/gsk/gl/gskglrenderjob.c index aedd97a382..9c84c51fd5 100644 --- a/gsk/gl/gskglrenderjob.c +++ b/gsk/gl/gskglrenderjob.c @@ -4221,10 +4221,12 @@ gsk_gl_render_job_visit_node (GskGLRenderJob *job, break; case GSK_TEXT_NODE: - gsk_gl_render_job_visit_text_node (job, - node, - gsk_text_node_get_color (node), - FALSE); + { + GdkRGBA rgba; + + gdk_color_to_float (gsk_text_node_get_color2 (node), GDK_COLOR_STATE_SRGB, (float *) &rgba); + gsk_gl_render_job_visit_text_node (job, node, &rgba, FALSE); + } break; case GSK_TEXTURE_NODE: