Performance improvements
This commit is contained in:
parent
d5fde04d09
commit
50dfd4e6ed
4 changed files with 15 additions and 45 deletions
|
|
@ -152,6 +152,8 @@ where
|
|||
);
|
||||
}
|
||||
|
||||
buffer.shape_until_cursor();
|
||||
|
||||
let buffer_x = layout.bounds().x;
|
||||
let buffer_y = layout.bounds().y;
|
||||
buffer.draw(text_color_u32, |x, y, w, h, color| {
|
||||
|
|
|
|||
|
|
@ -100,6 +100,8 @@ fn main() {
|
|||
let font_size = buffer.metrics().font_size;
|
||||
let line_height = buffer.metrics().line_height;
|
||||
|
||||
buffer.shape_until_cursor();
|
||||
|
||||
if buffer.redraw {
|
||||
let instant = Instant::now();
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ fn redraw(window: &mut Window, buffer: &mut TextBuffer<'_>) {
|
|||
let font_size = buffer.metrics().font_size;
|
||||
let line_height = buffer.metrics().line_height;
|
||||
|
||||
buffer.shape_until_cursor();
|
||||
|
||||
if buffer.redraw {
|
||||
let instant = Instant::now();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue