mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 18:07:35 +00:00
Kernel/Graphics: Flush the entire buffer if using VirtIO console
Keeping the exact details of a dirty rectangle doesn't make any sense when we just flush the entire screen, so just keep a simple boolean value to know if the screen needs to be flushed or not.
This commit is contained in:
parent
6fca2134d2
commit
d84d81fc4e
2 changed files with 6 additions and 43 deletions
|
@ -12,24 +12,6 @@
|
|||
|
||||
namespace Kernel::Graphics::VirtIOGPU {
|
||||
|
||||
class DirtyRect {
|
||||
public:
|
||||
void union_rect(size_t x, size_t y, size_t width, size_t height);
|
||||
bool is_dirty() const { return m_is_dirty; }
|
||||
size_t x() const { return m_x0; }
|
||||
size_t y() const { return m_y0; }
|
||||
size_t width() const { return m_x1 - m_x0; }
|
||||
size_t height() const { return m_y1 - m_y0; }
|
||||
void clear() { m_is_dirty = false; }
|
||||
|
||||
private:
|
||||
bool m_is_dirty { false };
|
||||
size_t m_x0 { 0 };
|
||||
size_t m_y0 { 0 };
|
||||
size_t m_x1 { 0 };
|
||||
size_t m_y1 { 0 };
|
||||
};
|
||||
|
||||
class Console final : public GenericFramebufferConsole {
|
||||
public:
|
||||
static NonnullRefPtr<Console> initialize(VirtIODisplayConnector& parent_display_connector);
|
||||
|
@ -44,7 +26,7 @@ private:
|
|||
|
||||
Console(VirtIODisplayConnector const& parent_display_connector, DisplayConnector::ModeSetting current_resolution);
|
||||
NonnullRefPtr<VirtIODisplayConnector> m_parent_display_connector;
|
||||
DirtyRect m_dirty_rect;
|
||||
bool m_dirty { false };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue