cogl-pango: Special case alpha of 0 for color glyphs

Like ed10aea44d, but for color glyphs. Since they do use the alpha
component from the given color.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1161
This commit is contained in:
Carlos Garnacho 2020-03-29 13:24:40 +02:00 committed by Carlos Garnacho
parent 8748841094
commit aa136f4515

View File

@ -913,7 +913,8 @@ cogl_pango_renderer_draw_glyphs (PangoRenderer *renderer,
alpha = pango_renderer_get_alpha (renderer,
PANGO_RENDER_PART_FOREGROUND);
cogl_color_init_from_4ub (&color, 0xff, 0xff, 0xff, alpha >> 8);
cogl_color_init_from_4ub (&color, 0xff, 0xff, 0xff,
alpha ? alpha >> 8 : 0xff);
_cogl_pango_display_list_set_color_override (priv->display_list, &color);
}