Only draw differences from previous frame
This commit is contained in:
parent
9512ddaa3b
commit
67f8919630
2 changed files with 12 additions and 11 deletions
|
|
@ -98,8 +98,11 @@ impl Terminal {
|
|||
}
|
||||
|
||||
fn draw_differences(&mut self) -> io::Result<()> {
|
||||
// TODO Only draw the differences
|
||||
for (x, y, cell) in self.frame.buffer.cells() {
|
||||
if self.prev_frame_buffer.at(x, y) == cell {
|
||||
continue;
|
||||
}
|
||||
|
||||
let content = StyledContent::new(cell.style, &cell.content as &str);
|
||||
self.out
|
||||
.queue(MoveTo(x, y))?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue