mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-22 02:09:24 +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
Notes:
sideshowbarker
2024-07-18 00:34:07 +09:00
Author: https://github.com/IdanHo
Commit: ec1f3abd34
Pull-request: https://github.com/SerenityOS/serenity/pull/11848
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/bgianfo ✅
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