]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb/tui: use tui_batch_rendering more
authorAndrew Burgess <aburgess@redhat.com>
Sat, 8 Feb 2025 21:22:45 +0000 (21:22 +0000)
committerAndrew Burgess <aburgess@redhat.com>
Mon, 10 Feb 2025 20:58:35 +0000 (20:58 +0000)
commitf2ab74973cf59d5f0c53a99143745bacc2ad9e51
tree78c9a33008112f9b7ecb36af9da5a67c17e1a78a
parentc5ac7c9f7c97d2c1f7e9a44b66451e598774e547
gdb/tui: use tui_batch_rendering more

While working on the commit:

  commit 4f28b020a3416ac87ac12cf7ae3625a4bc178975
  Date:   Wed Feb 5 20:12:03 2025 +0000

      gdb/tui: use wrefresh if output is not surpressed

I spotted some places where tui_win_info::refresh_window() was being
called when suppress_output was false.  This means that there is no
tui_batch_rendering in place on the call stack, and so, after that
commit, we might be performing more wrefresh() calls than necessary.

Before the above commit we would have been calling wnoutrefresh() and,
due to the missing tui_batch_rendering, there might have been a delay
before doupdate() was called.

To (hopefully) make screen updates smoother, this commit adds
tui_batch_rendering in a few places where it is possible that there
might be multiple window updates performed, this will mean the final
write to screen is deferred until the tui_batch_rendering goes out of
scope.

Other than possibly smother screen updates, there should be no user
visible changes after this commit.

Approved-By: Tom Tromey <tom@tromey.com>
gdb/tui/tui-hooks.c
gdb/tui/tui-win.c
gdb/tui/tui-winsource.c
gdb/tui/tui.c