render: minor optimization

Don't instantiate a pixman color unnecessarily when drawing a block
cursor.
This commit is contained in:
Daniel Eklöf 2019-08-17 17:43:47 +02:00
parent 80aef9b6af
commit 9b6d0cfcd1
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -215,7 +215,7 @@ render_cell(struct terminal *term, pixman_image_t *pix,
&(pixman_rectangle16_t){x, y, cell_cols * width, height});
/* Non-block cursors */
if (has_cursor) {
if (has_cursor && !block_cursor) {
pixman_color_t cursor_color = term->cursor_color.text >> 31
? color_hex_to_pixman(term->cursor_color.cursor)
: color_hex_to_pixman(_fg);