From 0c777d825da92778233cbec1a9c659429ee1e20c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Wed, 14 Jul 2021 19:55:23 +0200 Subject: [PATCH] =?UTF-8?q?Revert=20"render:=20don=E2=80=99t=20assume=20PI?= =?UTF-8?q?XMAN=5Fa8r8g8b8=20for=20color=20glyphs"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 9b4796e996a6b524718591df8d8ea1ebe3b9bbbd. Sub-pixel anti-aliasing also uses 32-bit glyphs (but x8r8g8b8, instead of a8r8g8b8)... --- render.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/render.c b/render.c index 81fe481d..80d5efb5 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_FORMAT_BPP(pixman_image_get_format(glyph->pix)) == 32)) { + if (unlikely(pixman_image_get_format(glyph->pix) == PIXMAN_a8r8g8b8)) { /* 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_FORMAT_BPP(pixman_image_get_format(glyph->pix)) == 32)) { + if (unlikely(pixman_image_get_format(glyph->pix) == PIXMAN_a8r8g8b8)) { /* 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,