[mutter/wip/carlosg/emoji-rapture] cogl-pango: Special case alpha of 0 for color glyphs



commit 053307777524b159f7c749fcb5d30cbaa84c2f9e
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sun Mar 29 13:24:40 2020 +0200

    cogl-pango: Special case alpha of 0 for color glyphs
    
    Like ed10aea44d85, but for color glyphs. Since they do use the alpha
    component from the given color.

 cogl/cogl-pango/cogl-pango-render.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/cogl/cogl-pango/cogl-pango-render.c b/cogl/cogl-pango/cogl-pango-render.c
index 938da98e9..07ba0ca4b 100644
--- a/cogl/cogl-pango/cogl-pango-render.c
+++ b/cogl/cogl-pango/cogl-pango-render.c
@@ -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);
                 }
 


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