aboutsummaryrefslogtreecommitdiff
path: root/alacritty_terminal/src/renderer/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'alacritty_terminal/src/renderer/mod.rs')
-rw-r--r--alacritty_terminal/src/renderer/mod.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/alacritty_terminal/src/renderer/mod.rs b/alacritty_terminal/src/renderer/mod.rs
index cd94247f..f074c6d5 100644
--- a/alacritty_terminal/src/renderer/mod.rs
+++ b/alacritty_terminal/src/renderer/mod.rs
@@ -31,7 +31,7 @@ use crate::cursor::{get_cursor_glyph, CursorKey};
use crate::gl;
use crate::gl::types::*;
use crate::index::{Column, Line};
-use crate::renderer::rects::{Rect, Rects};
+use crate::renderer::rects::RenderRect;
use crate::term::color::Rgb;
use crate::term::{self, cell, RenderableCell, RenderableCellContent};
@@ -679,7 +679,7 @@ impl QuadRenderer {
config: &Config,
props: &term::SizeInfo,
visual_bell_intensity: f64,
- cell_line_rects: Rects,
+ cell_line_rects: Vec<RenderRect>,
) {
// Swap to rectangle rendering program
unsafe {
@@ -710,12 +710,12 @@ impl QuadRenderer {
// Draw visual bell
let color = config.visual_bell.color;
- let rect = Rect::new(0., 0., props.width, props.height);
- self.render_rect(&rect, color, visual_bell_intensity as f32, props);
+ let rect = RenderRect::new(0., 0., props.width, props.height, color);
+ self.render_rect(&rect, visual_bell_intensity as f32, props);
// Draw underlines and strikeouts
- for cell_line_rect in cell_line_rects.rects() {
- self.render_rect(&cell_line_rect.0, cell_line_rect.1, 255., props);
+ for cell_line_rect in cell_line_rects {
+ self.render_rect(&cell_line_rect, 255., props);
}
// Deactivate rectangle program again
@@ -849,7 +849,7 @@ impl QuadRenderer {
// Render a rectangle
//
// This requires the rectangle program to be activated
- fn render_rect(&mut self, rect: &Rect<f32>, color: Rgb, alpha: f32, size: &term::SizeInfo) {
+ fn render_rect(&mut self, rect: &RenderRect, alpha: f32, size: &term::SizeInfo) {
// Do nothing when alpha is fully transparent
if alpha == 0. {
return;
@@ -876,7 +876,7 @@ impl QuadRenderer {
);
// Color
- self.rect_program.set_color(color, alpha);
+ self.rect_program.set_color(rect.color, alpha);
// Draw the rectangle
gl::DrawElements(gl::TRIANGLES, 6, gl::UNSIGNED_INT, ptr::null());