Remove outdated TODO/FIXME comments

This commit is contained in:
Christian Duerr 2019-09-21 19:54:32 +02:00 committed by GitHub
parent 71a818cb8f
commit 856cddc873
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 17 deletions

View File

@ -426,7 +426,6 @@ where
} }
// The evented instances are not dropped here so deregister them explicitly // The evented instances are not dropped here so deregister them explicitly
// TODO: Is this still necessary?
let _ = self.poll.deregister(&self.rx); let _ = self.poll.deregister(&self.rx);
let _ = self.pty.deregister(&self.poll); let _ = self.pty.deregister(&self.poll);

View File

@ -45,8 +45,6 @@ pub const FONT_SIZE_STEP: f32 = 0.5;
/// ///
/// An escape sequence may be emitted in case specific keys or key combinations /// An escape sequence may be emitted in case specific keys or key combinations
/// are activated. /// are activated.
///
/// TODO also need terminal state when processing input
pub struct Processor<'a, A: 'a> { pub struct Processor<'a, A: 'a> {
pub key_bindings: &'a [KeyBinding], pub key_bindings: &'a [KeyBinding],
pub mouse_bindings: &'a [MouseBinding], pub mouse_bindings: &'a [MouseBinding],

View File

@ -32,8 +32,9 @@ use crate::gl;
use crate::gl::types::*; use crate::gl::types::*;
use crate::index::{Column, Line}; use crate::index::{Column, Line};
use crate::renderer::rects::RenderRect; use crate::renderer::rects::RenderRect;
use crate::term::cell::{self, Flags};
use crate::term::color::Rgb; use crate::term::color::Rgb;
use crate::term::{self, cell, RenderableCell, RenderableCellContent}; use crate::term::{self, RenderableCell, RenderableCellContent};
pub mod rects; pub mod rects;
@ -977,7 +978,7 @@ impl<'a> RenderApi<'a> {
}), }),
bg: color.unwrap_or(Rgb { r: 0, g: 0, b: 0 }), bg: color.unwrap_or(Rgb { r: 0, g: 0, b: 0 }),
fg: Rgb { r: 0, g: 0, b: 0 }, fg: Rgb { r: 0, g: 0, b: 0 },
flags: cell::Flags::empty(), flags: Flags::empty(),
bg_alpha, bg_alpha,
}) })
.collect::<Vec<_>>(); .collect::<Vec<_>>();
@ -1026,19 +1027,15 @@ impl<'a> RenderApi<'a> {
}; };
// Get font key for cell // Get font key for cell
// FIXME this is super inefficient. let font_key = match cell.flags & Flags::BOLD_ITALIC {
let font_key = match ( Flags::BOLD_ITALIC => glyph_cache.bold_italic_key,
cell.flags.contains(cell::Flags::BOLD), Flags::ITALIC => glyph_cache.italic_key,
cell.flags.contains(cell::Flags::ITALIC), Flags::BOLD => glyph_cache.bold_key,
) { _ => glyph_cache.font_key,
(false, false) => glyph_cache.font_key,
(true, false) => glyph_cache.bold_key,
(false, true) => glyph_cache.italic_key,
(true, true) => glyph_cache.bold_italic_key,
}; };
// Don't render text of HIDDEN cells // Don't render text of HIDDEN cells
let mut chars = if cell.flags.contains(cell::Flags::HIDDEN) { let mut chars = if cell.flags.contains(Flags::HIDDEN) {
[' '; cell::MAX_ZEROWIDTH_CHARS + 1] [' '; cell::MAX_ZEROWIDTH_CHARS + 1]
} else { } else {
chars chars

View File

@ -26,6 +26,7 @@ bitflags! {
const INVERSE = 0b00_0000_0001; const INVERSE = 0b00_0000_0001;
const BOLD = 0b00_0000_0010; const BOLD = 0b00_0000_0010;
const ITALIC = 0b00_0000_0100; const ITALIC = 0b00_0000_0100;
const BOLD_ITALIC = 0b00_0000_0110;
const UNDERLINE = 0b00_0000_1000; const UNDERLINE = 0b00_0000_1000;
const WRAPLINE = 0b00_0001_0000; const WRAPLINE = 0b00_0001_0000;
const WIDE_CHAR = 0b00_0010_0000; const WIDE_CHAR = 0b00_0010_0000;

View File

@ -13,8 +13,6 @@
// limitations under the License. // limitations under the License.
// //
//! Font rendering based on CoreText //! Font rendering based on CoreText
//!
//! TODO error handling... just search for unwrap.
#![allow(improper_ctypes)] #![allow(improper_ctypes)]
use std::collections::HashMap; use std::collections::HashMap;
use std::path::PathBuf; use std::path::PathBuf;