diff options
Diffstat (limited to 'alacritty/src/renderer')
| -rw-r--r-- | alacritty/src/renderer/graphics/draw.rs | 6 | ||||
| -rw-r--r-- | alacritty/src/renderer/mod.rs | 5 | ||||
| -rw-r--r-- | alacritty/src/renderer/rects.rs | 17 |
3 files changed, 14 insertions, 14 deletions
diff --git a/alacritty/src/renderer/graphics/draw.rs b/alacritty/src/renderer/graphics/draw.rs index 81013b85..82b68b17 100644 --- a/alacritty/src/renderer/graphics/draw.rs +++ b/alacritty/src/renderer/graphics/draw.rs @@ -13,7 +13,7 @@ use crate::gl::{self, types::*}; use crate::renderer::graphics::{shader, GraphicsRenderer}; use alacritty_terminal::graphics::GraphicId; -use alacritty_terminal::index::{Column, Line}; +use alacritty_terminal::index::Column; use alacritty_terminal::term::SizeInfo; use log::trace; @@ -21,7 +21,7 @@ use log::trace; /// Position to render each texture in the grid. struct RenderPosition { column: Column, - line: Line, + line: usize, offset_x: u16, offset_y: u16, } @@ -79,7 +79,7 @@ impl RenderList { texture_id: graphic_texture.texture.0, sides: TopLeft, column: render_item.column.0 as GLuint, - line: render_item.line.0 as GLuint, + line: render_item.line as GLuint, height: graphic_texture.height, width: graphic_texture.width, offset_x: render_item.offset_x, diff --git a/alacritty/src/renderer/mod.rs b/alacritty/src/renderer/mod.rs index dc0a5345..7135d514 100644 --- a/alacritty/src/renderer/mod.rs +++ b/alacritty/src/renderer/mod.rs @@ -485,7 +485,7 @@ impl Batch { self.instances.push(InstanceData { col: cell.point.column.0 as u16, - row: cell.point.line.0 as u16, + row: cell.point.line as u16, top: glyph.top, left: glyph.left, @@ -848,7 +848,7 @@ impl<'a> RenderApi<'a> { pub fn render_string( &mut self, glyph_cache: &mut GlyphCache, - point: Point, + point: Point<usize>, fg: Rgb, bg: Rgb, string: &str, @@ -865,7 +865,6 @@ impl<'a> RenderApi<'a> { bg_alpha: 1.0, fg, bg, - is_match: false, }) .collect::<Vec<_>>(); diff --git a/alacritty/src/renderer/rects.rs b/alacritty/src/renderer/rects.rs index fd966d27..591c9f46 100644 --- a/alacritty/src/renderer/rects.rs +++ b/alacritty/src/renderer/rects.rs @@ -3,6 +3,7 @@ use std::mem; use crossfont::Metrics; +use alacritty_terminal::grid::Dimensions; use alacritty_terminal::index::{Column, Point}; use alacritty_terminal::term::cell::Flags; use alacritty_terminal::term::color::Rgb; @@ -31,8 +32,8 @@ impl RenderRect { #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub struct RenderLine { - pub start: Point, - pub end: Point, + pub start: Point<usize>, + pub end: Point<usize>, pub color: Rgb, } @@ -42,7 +43,7 @@ impl RenderLine { let mut start = self.start; while start.line < self.end.line { - let end = Point::new(start.line, size.cols() - 1); + let end = Point::new(start.line, size.last_column()); Self::push_rects(&mut rects, metrics, size, flag, start, end, self.color); start = Point::new(start.line + 1, Column(0)); } @@ -57,8 +58,8 @@ impl RenderLine { metrics: &Metrics, size: &SizeInfo, flag: Flags, - start: Point, - end: Point, + start: Point<usize>, + end: Point<usize>, color: Rgb, ) { let (position, thickness) = match flag { @@ -99,8 +100,8 @@ impl RenderLine { fn create_rect( size: &SizeInfo, descent: f32, - start: Point, - end: Point, + start: Point<usize>, + end: Point<usize>, position: f32, mut thickness: f32, color: Rgb, @@ -112,7 +113,7 @@ impl RenderLine { // Make sure lines are always visible. thickness = thickness.max(1.); - let line_bottom = (start.line.0 as f32 + 1.) * size.cell_height(); + let line_bottom = (start.line as f32 + 1.) * size.cell_height(); let baseline = line_bottom + descent; let mut y = (baseline - position - thickness / 2.).ceil(); |