mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-28 05:52:53 +00:00
Kernel/Console: Factor out framebuffer offset and support glyph_spacing
This allows the 9px width of Cathode to be preserved without increasing the bitmap size.
This commit is contained in:
parent
adef79b793
commit
805a3d5b29
Notes:
sideshowbarker
2024-07-17 10:54:57 +09:00
Author: https://github.com/MacDue
Commit: 805a3d5b29
Pull-request: https://github.com/SerenityOS/serenity/pull/14213
2 changed files with 26 additions and 14 deletions
|
@ -18,7 +18,7 @@ public:
|
|||
virtual size_t bytes_per_base_glyph() const override;
|
||||
virtual size_t chars_per_line() const override;
|
||||
|
||||
virtual size_t max_column() const override { return m_width / m_pixels_per_column; }
|
||||
virtual size_t max_column() const override { return m_width / (m_pixels_per_column + m_glyph_spacing); }
|
||||
virtual size_t max_row() const override { return m_height / m_pixels_per_row; }
|
||||
|
||||
virtual bool is_hardware_paged_capable() const override { return false; }
|
||||
|
@ -48,7 +48,10 @@ protected:
|
|||
virtual u8* framebuffer_data() = 0;
|
||||
size_t framebuffer_pitch() const { return m_pitch; }
|
||||
virtual void clear_glyph(size_t x, size_t y);
|
||||
u32* framebuffer_offset(size_t x, size_t y);
|
||||
void flush_glyph(size_t x, size_t y);
|
||||
|
||||
size_t const m_glyph_spacing { 1 };
|
||||
size_t const m_pixels_per_column { 8 };
|
||||
size_t const m_pixels_per_row { 16 };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue