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

Kernel: Consolidate API for creating AnonymousVMObject with given pages

We don't need to have a dedicated API for creating a VMObject with a
single page, the multi-page API option works in all cases.

Also make the API take a Span<NonnullRefPtr<PhysicalPage>> instead of
a NonnullRefPtrVector<PhysicalPage>.
This commit is contained in:
Andreas Kling 2021-07-22 09:03:13 +02:00
parent 9e15708aa0
commit 5217875f6a
7 changed files with 10 additions and 23 deletions

View file

@ -40,7 +40,7 @@ void FrameBufferDevice::create_framebuffer()
for (auto i = 0u; i < num_needed_pages; ++i) {
pages.append(write_sink_page);
}
m_framebuffer_sink_vmobject = AnonymousVMObject::try_create_with_physical_pages(move(pages));
m_framebuffer_sink_vmobject = AnonymousVMObject::try_create_with_physical_pages(pages.span());
MutexLocker locker(m_gpu.operation_lock());
m_current_buffer = &buffer_from_index(m_last_set_buffer_index.load());