mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:18:12 +00:00
Terminal: optimize repaints a bunch.
We track dirty character cells + pending whole-terminal scrolls. This drastically reduces the number of pixels pushed.
This commit is contained in:
parent
e452303c66
commit
d0137f0e96
3 changed files with 35 additions and 7 deletions
|
@ -61,8 +61,6 @@ int main(int, char**)
|
|||
return 1;
|
||||
}
|
||||
|
||||
dbgprintf("ptm_fd = %d\n", ptm_fd);
|
||||
|
||||
make_shell(ptm_fd);
|
||||
|
||||
int event_fd = open("/dev/gui_events", O_RDONLY | O_NONBLOCK);
|
||||
|
@ -79,9 +77,8 @@ int main(int, char**)
|
|||
byte buffer[1024];
|
||||
ssize_t ptm_nread = read(ptm_fd, buffer, sizeof(buffer));
|
||||
if (ptm_nread > 0) {
|
||||
for (ssize_t i = 0; i < ptm_nread; ++i) {
|
||||
for (ssize_t i = 0; i < ptm_nread; ++i)
|
||||
terminal.on_char(buffer[i]);
|
||||
}
|
||||
terminal.paint();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue