diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-07-22 21:27:05 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-07-24 09:02:43 +0000 |
| commit | bf285ae00a749147fa15ac86bc38e8b1d7cae217 (patch) | |
| tree | 2036423f876c2e8987686b69f8f8852057e4db46 | |
| parent | render: render_osd(): don’t assume a monospace font (diff) | |
render: render_osd(): don’t re-instantiate foreground color for each glyph
| -rw-r--r-- | render.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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); |
