mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-09 08:21:01 -04:00
render: minor optimization
Don't instantiate a pixman color unnecessarily when drawing a block cursor.
This commit is contained in:
parent
80aef9b6af
commit
9b6d0cfcd1
1 changed files with 1 additions and 1 deletions
2
render.c
2
render.c
|
|
@ -215,7 +215,7 @@ render_cell(struct terminal *term, pixman_image_t *pix,
|
||||||
&(pixman_rectangle16_t){x, y, cell_cols * width, height});
|
&(pixman_rectangle16_t){x, y, cell_cols * width, height});
|
||||||
|
|
||||||
/* Non-block cursors */
|
/* Non-block cursors */
|
||||||
if (has_cursor) {
|
if (has_cursor && !block_cursor) {
|
||||||
pixman_color_t cursor_color = term->cursor_color.text >> 31
|
pixman_color_t cursor_color = term->cursor_color.text >> 31
|
||||||
? color_hex_to_pixman(term->cursor_color.cursor)
|
? color_hex_to_pixman(term->cursor_color.cursor)
|
||||||
: color_hex_to_pixman(_fg);
|
: color_hex_to_pixman(_fg);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue