From c22ae98729437bf8370c54f7880f0473d472ac4a Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Tue, 17 Dec 2019 19:12:08 +0100 Subject: 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. --- terminal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'terminal.c') diff --git a/terminal.c b/terminal.c index acc526e5..7f9bb722 100644 --- a/terminal.c +++ b/terminal.c @@ -196,7 +196,8 @@ fdm_ptmx(struct fdm *fdm, int fd, int events, void *data) NULL); term->delayed_render_timer.is_armed = true; } - } + } else + term->render.pending = true; if (events & EPOLLHUP) return term_shutdown(term); -- cgit v1.3