diff options
author | trimental <timmins.s.lucas@gmail.com> | 2018-10-01 05:54:08 +0800 |
---|---|---|
committer | Christian Duerr <chrisduerr@users.noreply.github.com> | 2018-09-30 21:54:08 +0000 |
commit | b22999f1e7b39c1341caf797a98facb9010f89cf (patch) | |
tree | 4f97b33870c7058988c4edcdaf188f407053549b /src/renderer/mod.rs | |
parent | f785f88a58daa3919255a268fa1da62aa07f13a7 (diff) | |
download | alacritty-b22999f1e7b39c1341caf797a98facb9010f89cf.tar.gz alacritty-b22999f1e7b39c1341caf797a98facb9010f89cf.zip |
Drop terminal lock before rendering
The terminal lock is now dropped before rendering by storing
all grid cells before clearing the screen.
This frees the terminal to do other things since the lock is now
free, which lead to a performance benefit with high throughput
applications.
Diffstat (limited to 'src/renderer/mod.rs')
-rw-r--r-- | src/renderer/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/renderer/mod.rs b/src/renderer/mod.rs index b461db0c..bcc896ef 100644 --- a/src/renderer/mod.rs +++ b/src/renderer/mod.rs @@ -374,7 +374,7 @@ pub struct RenderApi<'a> { current_atlas: &'a mut usize, program: &'a mut ShaderProgram, config: &'a Config, - visual_bell_intensity: f32 + visual_bell_intensity: f32, } #[derive(Debug)] @@ -799,7 +799,7 @@ impl<'a> RenderApi<'a> { }) .collect::<Vec<_>>(); - self.render_cells(cells.into_iter(), glyph_cache); + self.render_cells(cells.iter(), glyph_cache); } #[inline] @@ -817,12 +817,12 @@ impl<'a> RenderApi<'a> { } } - pub fn render_cells<I>( + pub fn render_cells<'b, I>( &mut self, cells: I, glyph_cache: &mut GlyphCache ) - where I: Iterator<Item=RenderableCell> + where I: Iterator<Item=&'b RenderableCell> { for cell in cells { // Get font key for cell |