mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-16 08:21:20 -04:00
render: get rid of 'all-clean' detection
Instead of trying to figure out if we had to render something (i.e. something in the grid was dirty), and using that to determine whether to post a callback or not, we now let render_refresh() set a flag indication we need to render another frame. This simplifies render_grid(), which now _always_ renders, and pushes it to the compositor. The callback handler checks the pending flag and simply doesn't call render_grid() when there's no more pending state to render. This ends up reducing the number of wakeups when e.g. having a blinking cursor.
This commit is contained in:
parent
418ff5bcd9
commit
c22ae98729
3 changed files with 13 additions and 22 deletions
|
|
@ -298,6 +298,7 @@ struct terminal {
|
|||
struct cell *cell; /* For easy access to content */
|
||||
} last_cursor;
|
||||
|
||||
bool pending;
|
||||
struct buffer *last_buf; /* Buffer we rendered to last time */
|
||||
bool was_flashing; /* Flash was active last time we rendered */
|
||||
bool was_searching;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue