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

LibVirtGPU: Port to Core::Stream

This commit is contained in:
Lucas CHOLLET 2023-01-15 19:35:01 -05:00 committed by Sam Atkins
parent 2e52de5744
commit 0ab29cffd2
2 changed files with 7 additions and 7 deletions

View file

@ -38,15 +38,15 @@ static constexpr auto vert_shader = "VERT\n"
" 4: MOV_SAT OUT[1], IN[1]\n"
" 5: END\n"sv;
Device::Device(NonnullRefPtr<Core::File> gpu_file)
: m_gpu_file { gpu_file }
Device::Device(NonnullOwnPtr<Core::Stream::File> gpu_file)
: m_gpu_file { move(gpu_file) }
{
}
ErrorOr<NonnullOwnPtr<Device>> Device::create(Gfx::IntSize min_size)
{
auto file = TRY(Core::File::open("/dev/gpu/render0", Core::OpenMode::ReadWrite));
auto device = make<Device>(file);
auto file = TRY(Core::Stream::File::open("/dev/gpu/render0"sv, Core::Stream::OpenMode::ReadWrite));
auto device = make<Device>(move(file));
TRY(device->initialize_context(min_size));
return device;
}