diff --git a/Userland/Libraries/LibVirtGPU/CommandBufferBuilder.cpp b/Userland/Libraries/LibVirtGPU/CommandBufferBuilder.cpp index cad3892f97d..5552d716d99 100644 --- a/Userland/Libraries/LibVirtGPU/CommandBufferBuilder.cpp +++ b/Userland/Libraries/LibVirtGPU/CommandBufferBuilder.cpp @@ -1,5 +1,6 @@ /* * Copyright (c) 2022, Sahan Fernando + * Copyright (c) 2022, Stephan Unverwerth * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause @@ -9,12 +10,15 @@ #include #include -#include "CommandBufferBuilder.h" -#include "VirGLProtocol.h" +#include +#include + +namespace VirtGPU { constexpr int DRAWTARGET_WIDTH = 500; constexpr int DRAWTARGET_HEIGHT = 500; + static u32 encode_command(u32 length, u32 mid, Protocol::VirGLCommand command) { u32 command_value = to_underlying(command); @@ -301,3 +305,5 @@ void CommandBufferBuilder::append_bind_dsa(ObjectHandle handle) CommandBuilder builder(m_buffer, Protocol::VirGLCommand::BIND_OBJECT, to_underlying(Protocol::ObjectType::DSA)); builder.appendu32(handle.value()); // VIRGL_OBJ_BIND_HANDLE } + +} diff --git a/Userland/Libraries/LibVirtGPU/CommandBufferBuilder.h b/Userland/Libraries/LibVirtGPU/CommandBufferBuilder.h index 34250d7f5b4..7503cdf54a1 100644 --- a/Userland/Libraries/LibVirtGPU/CommandBufferBuilder.h +++ b/Userland/Libraries/LibVirtGPU/CommandBufferBuilder.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2022, Sahan Fernando + * Copyright (c) 2022, Stephan Unverwerth * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause @@ -9,9 +10,10 @@ #include #include +#include #include -#include "VirGLProtocol.h" +namespace VirtGPU { class CommandBufferBuilder { public: @@ -41,3 +43,5 @@ public: private: Vector m_buffer; }; + +} diff --git a/Userland/Libraries/LibVirtGPU/VirGLProtocol.h b/Userland/Libraries/LibVirtGPU/VirGLProtocol.h index 15d4afa5831..84f7af3a594 100644 --- a/Userland/Libraries/LibVirtGPU/VirGLProtocol.h +++ b/Userland/Libraries/LibVirtGPU/VirGLProtocol.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2022, Sahan Fernando + * Copyright (c) 2022, Stephan Unverwerth * * SPDX-License-Identifier: BSD-2-Clause */ @@ -8,6 +9,8 @@ #include +namespace VirtGPU { + AK_TYPEDEF_DISTINCT_ORDERED_ID(u32, ObjectHandle); AK_TYPEDEF_DISTINCT_ORDERED_ID(u32, ResourceID); @@ -208,3 +211,5 @@ enum class ShaderType : u32 { }; } + +}