From 9b4796e996a6b524718591df8d8ea1ebe3b9bbbd Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Tue, 13 Jul 2021 20:28:21 +0200 Subject: render: don’t assume PIXMAN_a8r8g8b8 for color glyphs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We may want to use PIXMAN_b8g8r8a8 on big-endian in the future. --- render.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/render.c b/render.c index 80d5efb5..81fe481d 100644 --- a/render.c +++ b/render.c @@ -682,7 +682,7 @@ render_cell(struct terminal *term, pixman_image_t *pix, if (i > 0 && glyph->x >= 0) g_x -= term->cell_width; - if (unlikely(pixman_image_get_format(glyph->pix) == PIXMAN_a8r8g8b8)) { + if (unlikely(PIXMAN_FORMAT_BPP(pixman_image_get_format(glyph->pix)) == 32)) { /* Glyph surface is a pre-rendered image (typically a color emoji...) */ if (!(cell->attrs.blink && term->blink.state == BLINK_OFF)) { pixman_image_composite32( @@ -2801,7 +2801,7 @@ render_search_box(struct terminal *term) continue; } - if (unlikely(pixman_image_get_format(glyph->pix) == PIXMAN_a8r8g8b8)) { + if (unlikely(PIXMAN_FORMAT_BPP(pixman_image_get_format(glyph->pix)) == 32)) { /* Glyph surface is a pre-rendered image (typically a color emoji...) */ pixman_image_composite32( PIXMAN_OP_OVER, glyph->pix, NULL, buf->pix[0], 0, 0, 0, 0, -- cgit v1.3