diff --git a/Userland/Libraries/LibVirtGPU/Device.cpp b/Userland/Libraries/LibVirtGPU/Device.cpp index f8bb98341a..f1ad713580 100644 --- a/Userland/Libraries/LibVirtGPU/Device.cpp +++ b/Userland/Libraries/LibVirtGPU/Device.cpp @@ -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 gpu_file) - : m_gpu_file { gpu_file } +Device::Device(NonnullOwnPtr gpu_file) + : m_gpu_file { move(gpu_file) } { } ErrorOr> Device::create(Gfx::IntSize min_size) { - auto file = TRY(Core::File::open("/dev/gpu/render0", Core::OpenMode::ReadWrite)); - auto device = make(file); + auto file = TRY(Core::Stream::File::open("/dev/gpu/render0"sv, Core::Stream::OpenMode::ReadWrite)); + auto device = make(move(file)); TRY(device->initialize_context(min_size)); return device; } diff --git a/Userland/Libraries/LibVirtGPU/Device.h b/Userland/Libraries/LibVirtGPU/Device.h index ac53b89a65..8f5d130871 100644 --- a/Userland/Libraries/LibVirtGPU/Device.h +++ b/Userland/Libraries/LibVirtGPU/Device.h @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include @@ -18,7 +18,7 @@ namespace VirtGPU { class Device final : public GPU::Device { public: - Device(NonnullRefPtr); + Device(NonnullOwnPtr); static ErrorOr> create(Gfx::IntSize min_size); @@ -66,7 +66,7 @@ private: ErrorOr create_virgl_resource(VirGL3DResourceSpec&); ErrorOr upload_command_buffer(Vector const&); - NonnullRefPtr m_gpu_file; + NonnullOwnPtr m_gpu_file; Protocol::ResourceID m_vbo_resource_id { 0 }; Protocol::ResourceID m_drawtarget { 0 };