mirror of
https://github.com/RGBCube/serenity
synced 2025-07-23 09:27:35 +00:00
Kernel: Use KString::formatted in FramebufferDevice::create_framebuffer
This allows us to avoid the infallible String::formatted.
This commit is contained in:
parent
618f123463
commit
ec1f3abd34
1 changed files with 2 additions and 1 deletions
|
@ -164,7 +164,8 @@ ErrorOr<void> FramebufferDevice::create_framebuffer()
|
|||
// Allocate frame buffer for both front and back
|
||||
auto& info = display_info();
|
||||
m_buffer_size = calculate_framebuffer_size(info.rect.width, info.rect.height);
|
||||
m_framebuffer = TRY(MM.allocate_kernel_region(m_buffer_size * 2, String::formatted("VirtGPU FrameBuffer #{}", m_scanout.value()), Memory::Region::Access::ReadWrite, AllocationStrategy::AllocateNow));
|
||||
auto region_name = TRY(KString::formatted("VirtGPU FrameBuffer #{}", m_scanout.value()));
|
||||
m_framebuffer = TRY(MM.allocate_kernel_region(m_buffer_size * 2, region_name->view(), Memory::Region::Access::ReadWrite, AllocationStrategy::AllocateNow));
|
||||
auto write_sink_page = MM.allocate_user_physical_page(Memory::MemoryManager::ShouldZeroFill::No).release_nonnull();
|
||||
auto num_needed_pages = m_framebuffer->vmobject().page_count();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue