1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 17:47:44 +00:00

Kernel: Enable additional VirtIO displays only on first resolution set

Also, only allocate the amount of memory we actually need for the given
resolution.
This commit is contained in:
Tom 2021-06-26 20:05:37 -06:00 committed by Andreas Kling
parent 8749235046
commit 56cd0f929e
5 changed files with 52 additions and 40 deletions

View file

@ -39,7 +39,6 @@ VirtIOGPUConsole::VirtIOGPUConsole(RefPtr<VirtIOFrameBufferDevice> const& frameb
: GenericFramebufferConsole(framebuffer_device->width(), framebuffer_device->height(), framebuffer_device->pitch())
, m_framebuffer_device(framebuffer_device)
{
m_framebuffer_region = m_framebuffer_device->region();
enqueue_refresh_timer();
}
@ -85,4 +84,9 @@ void VirtIOGPUConsole::enable()
m_dirty_rect.union_rect(0, 0, m_width, m_height);
}
u8* VirtIOGPUConsole::framebuffer_data()
{
return m_framebuffer_device->framebuffer_data();
}
}