From bf285ae00a749147fa15ac86bc38e8b1d7cae217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Thu, 22 Jul 2021 23:27:05 +0200 Subject: [PATCH] =?UTF-8?q?render:=20render=5Fosd():=20don=E2=80=99t=20re-?= =?UTF-8?q?instantiate=20foreground=20color=20for=20each=20glyph?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- render.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/render.c b/render.c index 581d0cbb..d5e7a7d6 100644 --- a/render.c +++ b/render.c @@ -1597,6 +1597,7 @@ render_osd(struct terminal *term, pixman_color_t fg = color_hex_to_pixman(_fg); const int x_ofs = term->font_x_ofs; + pixman_image_t *src = pixman_image_create_solid_fill(&fg); for (size_t i = 0; i < wcslen(text); i++) { const struct fcft_glyph *glyph = fcft_glyph_rasterize( @@ -1615,6 +1616,7 @@ render_osd(struct terminal *term, x += glyph->advance.x; } + pixman_image_unref(src); pixman_image_set_clip_region32(buf->pix[0], NULL); xassert(buf->width % term->scale == 0);