Kernel: Remove some unused code in Graphics::TextModeConsole

This commit is contained in:
Andreas Kling 2021-09-08 18:38:38 +02:00
parent 524ef5e475
commit 3e07b04564
2 changed files with 2 additions and 20 deletions

View file

@ -89,9 +89,7 @@ void TextModeConsole::set_cursor(size_t x, size_t y)
{
SpinlockLocker main_lock(GraphicsManagement::the().main_vga_lock());
SpinlockLocker lock(m_vga_lock);
m_cursor_x = x;
m_cursor_y = y;
u16 value = m_current_vga_start_address + (y * width() + x);
u16 value = y * width() + x;
IO::out8(0x3d4, 0x0e);
IO::out8(0x3d5, MSB(value));
IO::out8(0x3d4, 0x0f);
@ -160,18 +158,6 @@ void TextModeConsole::clear_vga_row(u16 row)
clear(row * width(), width(), width());
}
void TextModeConsole::set_vga_start_row(u16 row)
{
SpinlockLocker lock(m_vga_lock);
m_vga_start_row = row;
m_current_vga_start_address = row * width();
m_current_vga_window = m_current_vga_window + row * width() * bytes_per_base_glyph();
IO::out8(0x3d4, 0x0c);
IO::out8(0x3d5, MSB(m_current_vga_start_address));
IO::out8(0x3d4, 0x0d);
IO::out8(0x3d5, LSB(m_current_vga_start_address));
}
void TextModeConsole::write(char ch, bool critical)
{
write(m_x, m_y, ch, critical);

View file

@ -35,15 +35,11 @@ public:
private:
void clear_vga_row(u16 row);
void set_vga_start_row(u16 row);
explicit TextModeConsole(const VGACompatibleAdapter&);
mutable Spinlock m_vga_lock;
u16 m_vga_start_row { 0 };
u16 m_current_vga_start_address { 0 };
u8* m_current_vga_window { nullptr };
u16 m_cursor_x { 0 };
u16 m_cursor_y { 0 };
};
}