[mutter] cogl-pango: Special case alpha of 0



commit ed10aea44d8535f7750a62c8c5c94faaa5675945
Author: Florian Müllner <fmuellner gnome org>
Date:   Sat Mar 28 01:01:10 2020 +0100

    cogl-pango: Special case alpha of 0
    
    pango_renderer_get_alpha() returns 0 to indicate that the alpha value
    should be inherited from the environment, but we are passing it on
    (and therefore making the text fully translucent).
    
    Instead, make the text fully opaque as expected.
    
    https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1156

 cogl/cogl-pango/cogl-pango-render.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/cogl/cogl-pango/cogl-pango-render.c b/cogl/cogl-pango/cogl-pango-render.c
index 306513db7..938da98e9 100644
--- a/cogl/cogl-pango/cogl-pango-render.c
+++ b/cogl/cogl-pango/cogl-pango-render.c
@@ -730,7 +730,7 @@ cogl_pango_renderer_set_color_for_part (PangoRenderer   *renderer,
                                 pango_color->red >> 8,
                                 pango_color->green >> 8,
                                 pango_color->blue >> 8,
-                                alpha >> 8);
+                                alpha ? alpha >> 8 : 0xff);
 
       _cogl_pango_display_list_set_color_override (priv->display_list, &color);
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]