From 5d846ab50370af3c8c0c733ac2a314cfcc7d9eb9 Mon Sep 17 00:00:00 2001 From: Corentin Wallez Date: Tue, 11 Jan 2022 09:57:33 +0000 Subject: [PATCH] Rename namespace dawn_wire to dawn::wire. But keep a namespace alias to avoid breaking project that depend on the previous namespace name while they get updated. Bug: dawn:824 Change-Id: I1e99c4d0d2acf7644a225a88d07806d1a64478e6 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/75540 Reviewed-by: Austin Eng Commit-Queue: Corentin Wallez --- examples/SampleUtils.cpp | 14 ++++++------ generator/templates/dawn_wire/ObjectType.h | 4 ++-- generator/templates/dawn_wire/WireCmd.cpp | 4 ++-- generator/templates/dawn_wire/WireCmd.h | 4 ++-- .../templates/dawn_wire/client/ApiObjects.h | 4 ++-- .../templates/dawn_wire/client/ApiProcs.cpp | 4 ++-- .../templates/dawn_wire/client/ClientBase.h | 4 ++-- .../dawn_wire/client/ClientHandlers.cpp | 4 ++-- .../templates/dawn_wire/server/ServerBase.h | 4 ++-- .../dawn_wire/server/ServerDoers.cpp | 4 ++-- .../dawn_wire/server/ServerHandlers.cpp | 4 ++-- src/dawn_wire/BufferConsumer.h | 4 ++-- src/dawn_wire/BufferConsumer_impl.h | 4 ++-- src/dawn_wire/ChunkedCommandHandler.cpp | 4 ++-- src/dawn_wire/ChunkedCommandHandler.h | 4 ++-- src/dawn_wire/ChunkedCommandSerializer.cpp | 4 ++-- src/dawn_wire/ChunkedCommandSerializer.h | 4 ++-- src/dawn_wire/SupportedFeatures.cpp | 4 ++-- src/dawn_wire/SupportedFeatures.h | 4 ++-- src/dawn_wire/Wire.cpp | 4 ++-- src/dawn_wire/WireClient.cpp | 4 ++-- src/dawn_wire/WireDeserializeAllocator.cpp | 4 ++-- src/dawn_wire/WireDeserializeAllocator.h | 4 ++-- src/dawn_wire/WireResult.h | 4 ++-- src/dawn_wire/WireServer.cpp | 4 ++-- src/dawn_wire/client/Adapter.cpp | 4 ++-- src/dawn_wire/client/Adapter.h | 4 ++-- src/dawn_wire/client/Buffer.cpp | 4 ++-- src/dawn_wire/client/Buffer.h | 4 ++-- src/dawn_wire/client/Client.cpp | 4 ++-- src/dawn_wire/client/Client.h | 4 ++-- src/dawn_wire/client/ClientDoers.cpp | 4 ++-- .../ClientInlineMemoryTransferService.cpp | 4 ++-- .../ClientMemoryTransferService_mock.cpp | 4 ++-- .../client/ClientMemoryTransferService_mock.h | 4 ++-- src/dawn_wire/client/Device.cpp | 4 ++-- src/dawn_wire/client/Device.h | 4 ++-- src/dawn_wire/client/Instance.cpp | 4 ++-- src/dawn_wire/client/Instance.h | 4 ++-- src/dawn_wire/client/LimitsAndFeatures.cpp | 4 ++-- src/dawn_wire/client/LimitsAndFeatures.h | 4 ++-- src/dawn_wire/client/ObjectAllocator.h | 4 ++-- src/dawn_wire/client/ObjectBase.h | 4 ++-- src/dawn_wire/client/Queue.cpp | 4 ++-- src/dawn_wire/client/Queue.h | 4 ++-- src/dawn_wire/client/RequestTracker.h | 4 ++-- src/dawn_wire/client/ShaderModule.cpp | 4 ++-- src/dawn_wire/client/ShaderModule.h | 4 ++-- src/dawn_wire/server/ObjectStorage.h | 4 ++-- src/dawn_wire/server/Server.cpp | 4 ++-- src/dawn_wire/server/Server.h | 4 ++-- src/dawn_wire/server/ServerAdapter.cpp | 4 ++-- src/dawn_wire/server/ServerBuffer.cpp | 4 ++-- src/dawn_wire/server/ServerDevice.cpp | 4 ++-- .../ServerInlineMemoryTransferService.cpp | 4 ++-- src/dawn_wire/server/ServerInstance.cpp | 4 ++-- .../ServerMemoryTransferService_mock.cpp | 4 ++-- .../server/ServerMemoryTransferService_mock.h | 4 ++-- src/dawn_wire/server/ServerQueue.cpp | 4 ++-- src/dawn_wire/server/ServerShaderModule.cpp | 4 ++-- src/fuzzers/DawnWireServerFuzzer.cpp | 6 ++--- src/include/dawn_platform/DawnPlatform.h | 1 + src/include/dawn_wire/Wire.h | 7 ++++-- src/include/dawn_wire/WireClient.h | 4 ++-- src/include/dawn_wire/WireServer.h | 4 ++-- src/tests/DawnTest.h | 4 ++-- src/tests/unittests/GetProcAddressTests.cpp | 10 ++++----- src/tests/unittests/wire/WireAdapterTests.cpp | 2 +- .../unittests/wire/WireArgumentTests.cpp | 2 +- src/tests/unittests/wire/WireBasicTests.cpp | 2 +- .../unittests/wire/WireBufferMappingTests.cpp | 2 +- .../wire/WireCreatePipelineAsyncTests.cpp | 2 +- .../unittests/wire/WireDestroyObjectTests.cpp | 2 +- .../unittests/wire/WireDisconnectTests.cpp | 2 +- .../unittests/wire/WireErrorCallbackTests.cpp | 2 +- .../unittests/wire/WireExtensionTests.cpp | 2 +- .../unittests/wire/WireInjectDeviceTests.cpp | 2 +- .../wire/WireInjectInstanceTests.cpp | 2 +- .../wire/WireInjectSwapChainTests.cpp | 2 +- .../unittests/wire/WireInjectTextureTests.cpp | 2 +- .../unittests/wire/WireInstanceTests.cpp | 2 +- .../wire/WireMemoryTransferServiceTests.cpp | 6 ++--- .../unittests/wire/WireOptionalTests.cpp | 2 +- src/tests/unittests/wire/WireQueueTests.cpp | 2 +- .../unittests/wire/WireShaderModuleTests.cpp | 2 +- src/tests/unittests/wire/WireTest.cpp | 8 +++---- src/tests/unittests/wire/WireTest.h | 16 +++++++------- .../wire/WireWGPUDevicePropertiesTests.cpp | 16 +++++++------- src/utils/TerribleCommandBuffer.cpp | 4 ++-- src/utils/TerribleCommandBuffer.h | 8 +++---- src/utils/WireHelper.cpp | 22 +++++++++---------- 91 files changed, 202 insertions(+), 198 deletions(-) diff --git a/examples/SampleUtils.cpp b/examples/SampleUtils.cpp index fff8840e53..47fd05b86e 100644 --- a/examples/SampleUtils.cpp +++ b/examples/SampleUtils.cpp @@ -86,8 +86,8 @@ static utils::BackendBinding* binding = nullptr; static GLFWwindow* window = nullptr; -static dawn_wire::WireServer* wireServer = nullptr; -static dawn_wire::WireClient* wireClient = nullptr; +static dawn::wire::WireServer* wireServer = nullptr; +static dawn::wire::WireClient* wireClient = nullptr; static utils::TerribleCommandBuffer* c2sBuf = nullptr; static utils::TerribleCommandBuffer* s2cBuf = nullptr; @@ -149,18 +149,18 @@ wgpu::Device CreateCppDawnDevice() { c2sBuf = new utils::TerribleCommandBuffer(); s2cBuf = new utils::TerribleCommandBuffer(); - dawn_wire::WireServerDescriptor serverDesc = {}; + dawn::wire::WireServerDescriptor serverDesc = {}; serverDesc.procs = &backendProcs; serverDesc.serializer = s2cBuf; - wireServer = new dawn_wire::WireServer(serverDesc); + wireServer = new dawn::wire::WireServer(serverDesc); c2sBuf->SetHandler(wireServer); - dawn_wire::WireClientDescriptor clientDesc = {}; + dawn::wire::WireClientDescriptor clientDesc = {}; clientDesc.serializer = c2sBuf; - wireClient = new dawn_wire::WireClient(clientDesc); - procs = dawn_wire::client::GetProcs(); + wireClient = new dawn::wire::WireClient(clientDesc); + procs = dawn::wire::client::GetProcs(); s2cBuf->SetHandler(wireClient); auto deviceReservation = wireClient->ReserveDevice(); diff --git a/generator/templates/dawn_wire/ObjectType.h b/generator/templates/dawn_wire/ObjectType.h index e049d3782e..ce3572ec01 100644 --- a/generator/templates/dawn_wire/ObjectType.h +++ b/generator/templates/dawn_wire/ObjectType.h @@ -17,7 +17,7 @@ #include "common/ityp_array.h" -namespace dawn_wire { +namespace dawn::wire { enum class ObjectType : uint32_t { {% for type in by_category["object"] %} @@ -28,7 +28,7 @@ namespace dawn_wire { template using PerObjectType = ityp::array; -} // namespace dawn_wire +} // namespace dawn::wire #endif // DAWNWIRE_OBJECTTPYE_AUTOGEN_H_ diff --git a/generator/templates/dawn_wire/WireCmd.cpp b/generator/templates/dawn_wire/WireCmd.cpp index f463205baf..9a1490a848 100644 --- a/generator/templates/dawn_wire/WireCmd.cpp +++ b/generator/templates/dawn_wire/WireCmd.cpp @@ -649,7 +649,7 @@ } {% endmacro %} -namespace dawn_wire { +namespace dawn::wire { ObjectHandle::ObjectHandle() = default; ObjectHandle::ObjectHandle(ObjectId id, ObjectGeneration generation) @@ -852,4 +852,4 @@ namespace dawn_wire { nullptr, resolver) == WireResult::Success; } -} // namespace dawn_wire +} // namespace dawn::wire diff --git a/generator/templates/dawn_wire/WireCmd.h b/generator/templates/dawn_wire/WireCmd.h index 077dbf4982..5ffd639c57 100644 --- a/generator/templates/dawn_wire/WireCmd.h +++ b/generator/templates/dawn_wire/WireCmd.h @@ -21,7 +21,7 @@ #include "dawn_wire/ObjectType_autogen.h" #include "dawn_wire/WireResult.h" -namespace dawn_wire { +namespace dawn::wire { using ObjectId = uint32_t; using ObjectGeneration = uint32_t; @@ -133,6 +133,6 @@ namespace dawn_wire { {{write_command_struct(command, True)}} {% endfor %} -} // namespace dawn_wire +} // namespace dawn::wire #endif // DAWNWIRE_WIRECMD_AUTOGEN_H_ diff --git a/generator/templates/dawn_wire/client/ApiObjects.h b/generator/templates/dawn_wire/client/ApiObjects.h index b010ad9cc6..d9d462618b 100644 --- a/generator/templates/dawn_wire/client/ApiObjects.h +++ b/generator/templates/dawn_wire/client/ApiObjects.h @@ -18,7 +18,7 @@ #include "dawn_wire/ObjectType_autogen.h" #include "dawn_wire/client/ObjectBase.h" -namespace dawn_wire::client { +namespace dawn::wire::client { template struct ObjectTypeToTypeEnum { @@ -48,6 +48,6 @@ namespace dawn_wire::client { }; {% endfor %} -} // namespace dawn_wire::client +} // namespace dawn::wire::client #endif // DAWNWIRE_CLIENT_APIOBJECTS_AUTOGEN_H_ diff --git a/generator/templates/dawn_wire/client/ApiProcs.cpp b/generator/templates/dawn_wire/client/ApiProcs.cpp index fae6cc0fc4..c5b77ef5cb 100644 --- a/generator/templates/dawn_wire/client/ApiProcs.cpp +++ b/generator/templates/dawn_wire/client/ApiProcs.cpp @@ -21,7 +21,7 @@ #include #include -namespace dawn_wire::client { +namespace dawn::wire::client { //* Outputs an rvalue that's the number of elements a pointer member points to. {% macro member_length(member, accessor) -%} @@ -175,4 +175,4 @@ namespace dawn_wire::client { const {{Prefix}}ProcTable& GetProcs() { return gProcTable; } -} // namespace dawn_wire::client +} // namespace dawn::wire::client diff --git a/generator/templates/dawn_wire/client/ClientBase.h b/generator/templates/dawn_wire/client/ClientBase.h index 4b59b4ff4b..d956acc95b 100644 --- a/generator/templates/dawn_wire/client/ClientBase.h +++ b/generator/templates/dawn_wire/client/ClientBase.h @@ -20,7 +20,7 @@ #include "dawn_wire/client/ApiObjects.h" #include "dawn_wire/client/ObjectAllocator.h" -namespace dawn_wire::client { +namespace dawn::wire::client { class ClientBase : public ChunkedCommandHandler, public ObjectIdProvider { public: @@ -69,6 +69,6 @@ namespace dawn_wire::client { {% endfor %} }; -} // namespace dawn_wire::client +} // namespace dawn::wire::client #endif // DAWNWIRE_CLIENT_CLIENTBASE_AUTOGEN_H_ diff --git a/generator/templates/dawn_wire/client/ClientHandlers.cpp b/generator/templates/dawn_wire/client/ClientHandlers.cpp index 25c0b4fe51..749152a033 100644 --- a/generator/templates/dawn_wire/client/ClientHandlers.cpp +++ b/generator/templates/dawn_wire/client/ClientHandlers.cpp @@ -17,7 +17,7 @@ #include -namespace dawn_wire::client { +namespace dawn::wire::client { {% for command in cmd_records["return command"] %} bool Client::Handle{{command.name.CamelCase()}}(DeserializeBuffer* deserializeBuffer) { Return{{command.name.CamelCase()}}Cmd cmd; @@ -94,4 +94,4 @@ namespace dawn_wire::client { return commands; } -} // namespace dawn_wire::client +} // namespace dawn::wire::client diff --git a/generator/templates/dawn_wire/server/ServerBase.h b/generator/templates/dawn_wire/server/ServerBase.h index 46ef629c69..971da84e29 100644 --- a/generator/templates/dawn_wire/server/ServerBase.h +++ b/generator/templates/dawn_wire/server/ServerBase.h @@ -22,7 +22,7 @@ #include "dawn_wire/WireDeserializeAllocator.h" #include "dawn_wire/server/ObjectStorage.h" -namespace dawn_wire::server { +namespace dawn::wire::server { class ServerBase : public ChunkedCommandHandler, public ObjectIdResolver { public: @@ -100,6 +100,6 @@ namespace dawn_wire::server { {% endfor %} }; -} // namespace dawn_wire::server +} // namespace dawn::wire::server #endif // DAWNWIRE_SERVER_SERVERBASE_H_ diff --git a/generator/templates/dawn_wire/server/ServerDoers.cpp b/generator/templates/dawn_wire/server/ServerDoers.cpp index 5ccbb5f2b7..ce4854e4f1 100644 --- a/generator/templates/dawn_wire/server/ServerDoers.cpp +++ b/generator/templates/dawn_wire/server/ServerDoers.cpp @@ -15,7 +15,7 @@ #include "common/Assert.h" #include "dawn_wire/server/Server.h" -namespace dawn_wire::server { +namespace dawn::wire::server { //* Implementation of the command doers {% for command in cmd_records["command"] %} {% set type = command.derived_object %} @@ -118,4 +118,4 @@ namespace dawn_wire::server { } } -} // namespace dawn_wire::server +} // namespace dawn::wire::server diff --git a/generator/templates/dawn_wire/server/ServerHandlers.cpp b/generator/templates/dawn_wire/server/ServerHandlers.cpp index b853f6f075..9c9db068f5 100644 --- a/generator/templates/dawn_wire/server/ServerHandlers.cpp +++ b/generator/templates/dawn_wire/server/ServerHandlers.cpp @@ -15,7 +15,7 @@ #include "common/Assert.h" #include "dawn_wire/server/Server.h" -namespace dawn_wire::server { +namespace dawn::wire::server { {% for command in cmd_records["command"] %} {% set method = command.derived_method %} {% set is_method = method != None %} @@ -147,4 +147,4 @@ namespace dawn_wire::server { return commands; } -} // namespace dawn_wire::server +} // namespace dawn::wire::server diff --git a/src/dawn_wire/BufferConsumer.h b/src/dawn_wire/BufferConsumer.h index 3797bf40c8..b7ae3e6796 100644 --- a/src/dawn_wire/BufferConsumer.h +++ b/src/dawn_wire/BufferConsumer.h @@ -19,7 +19,7 @@ #include -namespace dawn_wire { +namespace dawn::wire { // BufferConsumer is a utility class that allows reading bytes from a buffer // while simultaneously decrementing the amount of remaining space by exactly @@ -80,6 +80,6 @@ namespace dawn_wire { } }; -} // namespace dawn_wire +} // namespace dawn::wire #endif // DAWNWIRE_BUFFERCONSUMER_H_ \ No newline at end of file diff --git a/src/dawn_wire/BufferConsumer_impl.h b/src/dawn_wire/BufferConsumer_impl.h index fdd5fdbc72..43969ec80c 100644 --- a/src/dawn_wire/BufferConsumer_impl.h +++ b/src/dawn_wire/BufferConsumer_impl.h @@ -20,7 +20,7 @@ #include #include -namespace dawn_wire { +namespace dawn::wire { template template @@ -68,6 +68,6 @@ namespace dawn_wire { return WireResult::Success; } -} // namespace dawn_wire +} // namespace dawn::wire #endif // DAWNWIRE_BUFFERCONSUMER_IMPL_H_ diff --git a/src/dawn_wire/ChunkedCommandHandler.cpp b/src/dawn_wire/ChunkedCommandHandler.cpp index 8a962d9653..d513b5e3ff 100644 --- a/src/dawn_wire/ChunkedCommandHandler.cpp +++ b/src/dawn_wire/ChunkedCommandHandler.cpp @@ -19,7 +19,7 @@ #include #include -namespace dawn_wire { +namespace dawn::wire { ChunkedCommandHandler::~ChunkedCommandHandler() = default; @@ -76,4 +76,4 @@ namespace dawn_wire { return ChunkedCommandsResult::Consumed; } -} // namespace dawn_wire +} // namespace dawn::wire diff --git a/src/dawn_wire/ChunkedCommandHandler.h b/src/dawn_wire/ChunkedCommandHandler.h index 182ceadecb..d7d2c06c25 100644 --- a/src/dawn_wire/ChunkedCommandHandler.h +++ b/src/dawn_wire/ChunkedCommandHandler.h @@ -22,7 +22,7 @@ #include #include -namespace dawn_wire { +namespace dawn::wire { class ChunkedCommandHandler : public CommandHandler { public: @@ -66,6 +66,6 @@ namespace dawn_wire { std::unique_ptr mChunkedCommandData; }; -} // namespace dawn_wire +} // namespace dawn::wire #endif // DAWNWIRE_CHUNKEDCOMMANDHANDLER_H_ diff --git a/src/dawn_wire/ChunkedCommandSerializer.cpp b/src/dawn_wire/ChunkedCommandSerializer.cpp index 71b77162bf..b45fbc714e 100644 --- a/src/dawn_wire/ChunkedCommandSerializer.cpp +++ b/src/dawn_wire/ChunkedCommandSerializer.cpp @@ -14,7 +14,7 @@ #include "dawn_wire/ChunkedCommandSerializer.h" -namespace dawn_wire { +namespace dawn::wire { ChunkedCommandSerializer::ChunkedCommandSerializer(CommandSerializer* serializer) : mSerializer(serializer), mMaxAllocationSize(serializer->GetMaximumAllocationSize()) { @@ -35,4 +35,4 @@ namespace dawn_wire { } } -} // namespace dawn_wire +} // namespace dawn::wire diff --git a/src/dawn_wire/ChunkedCommandSerializer.h b/src/dawn_wire/ChunkedCommandSerializer.h index 2465f8153d..10572b1fa2 100644 --- a/src/dawn_wire/ChunkedCommandSerializer.h +++ b/src/dawn_wire/ChunkedCommandSerializer.h @@ -24,7 +24,7 @@ #include #include -namespace dawn_wire { +namespace dawn::wire { class ChunkedCommandSerializer { public: @@ -109,6 +109,6 @@ namespace dawn_wire { size_t mMaxAllocationSize; }; -} // namespace dawn_wire +} // namespace dawn::wire #endif // DAWNWIRE_CHUNKEDCOMMANDSERIALIZER_H_ diff --git a/src/dawn_wire/SupportedFeatures.cpp b/src/dawn_wire/SupportedFeatures.cpp index 41c3a4ad80..dc40443c31 100644 --- a/src/dawn_wire/SupportedFeatures.cpp +++ b/src/dawn_wire/SupportedFeatures.cpp @@ -14,7 +14,7 @@ #include "dawn_wire/SupportedFeatures.h" -namespace dawn_wire { +namespace dawn::wire { // Note: Upon updating this list, please also update serialization/deserialization // of limit structs on Adapter/Device initialization. @@ -46,4 +46,4 @@ namespace dawn_wire { return false; } -} // namespace dawn_wire +} // namespace dawn::wire diff --git a/src/dawn_wire/SupportedFeatures.h b/src/dawn_wire/SupportedFeatures.h index 5405ad4f6e..9c173e1633 100644 --- a/src/dawn_wire/SupportedFeatures.h +++ b/src/dawn_wire/SupportedFeatures.h @@ -17,10 +17,10 @@ #include -namespace dawn_wire { +namespace dawn::wire { bool IsFeatureSupported(WGPUFeatureName feature); -} // namespace dawn_wire +} // namespace dawn::wire #endif // DAWNWIRE_SUPPORTEDFEATURES_H_ diff --git a/src/dawn_wire/Wire.cpp b/src/dawn_wire/Wire.cpp index 7221d6b054..ea36b32489 100644 --- a/src/dawn_wire/Wire.cpp +++ b/src/dawn_wire/Wire.cpp @@ -14,7 +14,7 @@ #include "dawn_wire/Wire.h" -namespace dawn_wire { +namespace dawn::wire { CommandSerializer::CommandSerializer() = default; CommandSerializer::~CommandSerializer() = default; @@ -25,4 +25,4 @@ namespace dawn_wire { CommandHandler::CommandHandler() = default; CommandHandler::~CommandHandler() = default; -} // namespace dawn_wire +} // namespace dawn::wire diff --git a/src/dawn_wire/WireClient.cpp b/src/dawn_wire/WireClient.cpp index a23e2f7d45..f75d4a8ad9 100644 --- a/src/dawn_wire/WireClient.cpp +++ b/src/dawn_wire/WireClient.cpp @@ -15,7 +15,7 @@ #include "dawn_wire/WireClient.h" #include "dawn_wire/client/Client.h" -namespace dawn_wire { +namespace dawn::wire { WireClient::WireClient(const WireClientDescriptor& descriptor) : mImpl(new client::Client(descriptor.serializer, descriptor.memoryTransferService)) { @@ -79,4 +79,4 @@ namespace dawn_wire { MemoryTransferService::WriteHandle::~WriteHandle() = default; } // namespace client -} // namespace dawn_wire +} // namespace dawn::wire diff --git a/src/dawn_wire/WireDeserializeAllocator.cpp b/src/dawn_wire/WireDeserializeAllocator.cpp index 7ae1b35c3f..fda837b77a 100644 --- a/src/dawn_wire/WireDeserializeAllocator.cpp +++ b/src/dawn_wire/WireDeserializeAllocator.cpp @@ -16,7 +16,7 @@ #include -namespace dawn_wire { +namespace dawn::wire { WireDeserializeAllocator::WireDeserializeAllocator() { Reset(); } @@ -57,4 +57,4 @@ namespace dawn_wire { mCurrentBuffer = mStaticBuffer; mRemainingSize = sizeof(mStaticBuffer); } -} // namespace dawn_wire +} // namespace dawn::wire diff --git a/src/dawn_wire/WireDeserializeAllocator.h b/src/dawn_wire/WireDeserializeAllocator.h index 4c34456458..613aba734f 100644 --- a/src/dawn_wire/WireDeserializeAllocator.h +++ b/src/dawn_wire/WireDeserializeAllocator.h @@ -19,7 +19,7 @@ #include -namespace dawn_wire { +namespace dawn::wire { // A really really simple implementation of the DeserializeAllocator. It's main feature // is that it has some inline storage so as to avoid allocations for the majority of // commands. @@ -38,6 +38,6 @@ namespace dawn_wire { char mStaticBuffer[2048]; std::vector mAllocations; }; -} // namespace dawn_wire +} // namespace dawn::wire #endif // DAWNWIRE_WIREDESERIALIZEALLOCATOR_H_ diff --git a/src/dawn_wire/WireResult.h b/src/dawn_wire/WireResult.h index 02707392bb..165b57a26a 100644 --- a/src/dawn_wire/WireResult.h +++ b/src/dawn_wire/WireResult.h @@ -17,7 +17,7 @@ #include "common/Compiler.h" -namespace dawn_wire { +namespace dawn::wire { enum class [[nodiscard]] WireResult{ Success, @@ -33,6 +33,6 @@ namespace dawn_wire { } \ } while (0) -} // namespace dawn_wire +} // namespace dawn::wire #endif // DAWNWIRE_WIRERESULT_H_ diff --git a/src/dawn_wire/WireServer.cpp b/src/dawn_wire/WireServer.cpp index c998e447d1..ba00527619 100644 --- a/src/dawn_wire/WireServer.cpp +++ b/src/dawn_wire/WireServer.cpp @@ -15,7 +15,7 @@ #include "dawn_wire/WireServer.h" #include "dawn_wire/server/Server.h" -namespace dawn_wire { +namespace dawn::wire { WireServer::WireServer(const WireServerDescriptor& descriptor) : mImpl(new server::Server(*descriptor.procs, @@ -80,4 +80,4 @@ namespace dawn_wire { } } // namespace server -} // namespace dawn_wire +} // namespace dawn::wire diff --git a/src/dawn_wire/client/Adapter.cpp b/src/dawn_wire/client/Adapter.cpp index e33df03681..4b4908c14c 100644 --- a/src/dawn_wire/client/Adapter.cpp +++ b/src/dawn_wire/client/Adapter.cpp @@ -17,7 +17,7 @@ #include "common/Log.h" #include "dawn_wire/client/Client.h" -namespace dawn_wire::client { +namespace dawn::wire::client { Adapter::~Adapter() { mRequestDeviceRequests.CloseAll([](RequestDeviceData* request) { @@ -130,4 +130,4 @@ namespace dawn_wire::client { return nullptr; } -} // namespace dawn_wire::client +} // namespace dawn::wire::client diff --git a/src/dawn_wire/client/Adapter.h b/src/dawn_wire/client/Adapter.h index e67a8b8ae0..0988cd5d72 100644 --- a/src/dawn_wire/client/Adapter.h +++ b/src/dawn_wire/client/Adapter.h @@ -23,7 +23,7 @@ #include "dawn_wire/client/ObjectBase.h" #include "dawn_wire/client/RequestTracker.h" -namespace dawn_wire::client { +namespace dawn::wire::client { class Adapter final : public ObjectBase { public: @@ -65,6 +65,6 @@ namespace dawn_wire::client { RequestTracker mRequestDeviceRequests; }; -} // namespace dawn_wire::client +} // namespace dawn::wire::client #endif // DAWNWIRE_CLIENT_ADAPTER_H_ diff --git a/src/dawn_wire/client/Buffer.cpp b/src/dawn_wire/client/Buffer.cpp index 51b30106ec..69811d128c 100644 --- a/src/dawn_wire/client/Buffer.cpp +++ b/src/dawn_wire/client/Buffer.cpp @@ -19,7 +19,7 @@ #include "dawn_wire/client/Client.h" #include "dawn_wire/client/Device.h" -namespace dawn_wire::client { +namespace dawn::wire::client { // static WGPUBuffer Buffer::Create(Device* device, const WGPUBufferDescriptor* descriptor) { @@ -402,4 +402,4 @@ namespace dawn_wire::client { mMappedData = nullptr; } -} // namespace dawn_wire::client +} // namespace dawn::wire::client diff --git a/src/dawn_wire/client/Buffer.h b/src/dawn_wire/client/Buffer.h index f362621970..ecdeba7be8 100644 --- a/src/dawn_wire/client/Buffer.h +++ b/src/dawn_wire/client/Buffer.h @@ -21,7 +21,7 @@ #include "dawn_wire/client/ObjectBase.h" #include "dawn_wire/client/RequestTracker.h" -namespace dawn_wire::client { +namespace dawn::wire::client { class Device; @@ -104,6 +104,6 @@ namespace dawn_wire::client { std::weak_ptr mDeviceIsAlive; }; -} // namespace dawn_wire::client +} // namespace dawn::wire::client #endif // DAWNWIRE_CLIENT_BUFFER_H_ diff --git a/src/dawn_wire/client/Client.cpp b/src/dawn_wire/client/Client.cpp index b01e8f56ba..f5c1370d24 100644 --- a/src/dawn_wire/client/Client.cpp +++ b/src/dawn_wire/client/Client.cpp @@ -17,7 +17,7 @@ #include "common/Compiler.h" #include "dawn_wire/client/Device.h" -namespace dawn_wire::client { +namespace dawn::wire::client { namespace { @@ -168,4 +168,4 @@ namespace dawn_wire::client { return mDisconnected; } -} // namespace dawn_wire::client +} // namespace dawn::wire::client diff --git a/src/dawn_wire/client/Client.h b/src/dawn_wire/client/Client.h index 1e5e47f1c6..e84f7a5d6c 100644 --- a/src/dawn_wire/client/Client.h +++ b/src/dawn_wire/client/Client.h @@ -26,7 +26,7 @@ #include "dawn_wire/WireDeserializeAllocator.h" #include "dawn_wire/client/ClientBase_autogen.h" -namespace dawn_wire::client { +namespace dawn::wire::client { class Device; class MemoryTransferService; @@ -90,6 +90,6 @@ namespace dawn_wire::client { std::unique_ptr CreateInlineMemoryTransferService(); -} // namespace dawn_wire::client +} // namespace dawn::wire::client #endif // DAWNWIRE_CLIENT_CLIENT_H_ diff --git a/src/dawn_wire/client/ClientDoers.cpp b/src/dawn_wire/client/ClientDoers.cpp index fd75a0945f..8f2be8be88 100644 --- a/src/dawn_wire/client/ClientDoers.cpp +++ b/src/dawn_wire/client/ClientDoers.cpp @@ -18,7 +18,7 @@ #include -namespace dawn_wire::client { +namespace dawn::wire::client { bool Client::DoDeviceUncapturedErrorCallback(Device* device, WGPUErrorType errorType, @@ -130,4 +130,4 @@ namespace dawn_wire::client { return shaderModule->GetCompilationInfoCallback(requestSerial, status, info); } -} // namespace dawn_wire::client +} // namespace dawn::wire::client diff --git a/src/dawn_wire/client/ClientInlineMemoryTransferService.cpp b/src/dawn_wire/client/ClientInlineMemoryTransferService.cpp index f03969ed5d..0830b88631 100644 --- a/src/dawn_wire/client/ClientInlineMemoryTransferService.cpp +++ b/src/dawn_wire/client/ClientInlineMemoryTransferService.cpp @@ -19,7 +19,7 @@ #include -namespace dawn_wire::client { +namespace dawn::wire::client { class InlineMemoryTransferService : public MemoryTransferService { class ReadHandleImpl : public ReadHandle { @@ -128,4 +128,4 @@ namespace dawn_wire::client { return std::make_unique(); } -} // namespace dawn_wire::client +} // namespace dawn::wire::client diff --git a/src/dawn_wire/client/ClientMemoryTransferService_mock.cpp b/src/dawn_wire/client/ClientMemoryTransferService_mock.cpp index eed0aea251..451a64ce04 100644 --- a/src/dawn_wire/client/ClientMemoryTransferService_mock.cpp +++ b/src/dawn_wire/client/ClientMemoryTransferService_mock.cpp @@ -17,7 +17,7 @@ #include #include "common/Assert.h" -namespace dawn_wire::client { +namespace dawn::wire::client { MockMemoryTransferService::MockReadHandle::MockReadHandle(MockMemoryTransferService* service) : ReadHandle(), mService(service) { @@ -102,4 +102,4 @@ namespace dawn_wire::client { return new MockWriteHandle(this); } -} // namespace dawn_wire::client +} // namespace dawn::wire::client diff --git a/src/dawn_wire/client/ClientMemoryTransferService_mock.h b/src/dawn_wire/client/ClientMemoryTransferService_mock.h index 0db3530b87..1ee2a3d802 100644 --- a/src/dawn_wire/client/ClientMemoryTransferService_mock.h +++ b/src/dawn_wire/client/ClientMemoryTransferService_mock.h @@ -20,7 +20,7 @@ #include "dawn_wire/WireClient.h" #include "dawn_wire/client/Client.h" -namespace dawn_wire::client { +namespace dawn::wire::client { class MockMemoryTransferService : public MemoryTransferService { public: @@ -94,6 +94,6 @@ namespace dawn_wire::client { MOCK_METHOD(void, OnWriteHandleDestroy, (const void* WriteHandle)); }; -} // namespace dawn_wire::client +} // namespace dawn::wire::client #endif // DAWNWIRE_CLIENT_CLIENTMEMORYTRANSFERSERVICE_MOCK_H_ diff --git a/src/dawn_wire/client/Device.cpp b/src/dawn_wire/client/Device.cpp index 49c5f2bd6b..3b40015c34 100644 --- a/src/dawn_wire/client/Device.cpp +++ b/src/dawn_wire/client/Device.cpp @@ -20,7 +20,7 @@ #include "dawn_wire/client/Client.h" #include "dawn_wire/client/ObjectAllocator.h" -namespace dawn_wire::client { +namespace dawn::wire::client { Device::Device(Client* clientIn, uint32_t initialRefcount, uint32_t initialId) : ObjectBase(clientIn, initialRefcount, initialId), mIsAlive(std::make_shared()) { @@ -339,4 +339,4 @@ namespace dawn_wire::client { return true; } -} // namespace dawn_wire::client +} // namespace dawn::wire::client diff --git a/src/dawn_wire/client/Device.h b/src/dawn_wire/client/Device.h index 87965eaed5..e9c15a6011 100644 --- a/src/dawn_wire/client/Device.h +++ b/src/dawn_wire/client/Device.h @@ -26,7 +26,7 @@ #include -namespace dawn_wire::client { +namespace dawn::wire::client { class Client; class Queue; @@ -107,6 +107,6 @@ namespace dawn_wire::client { std::shared_ptr mIsAlive; }; -} // namespace dawn_wire::client +} // namespace dawn::wire::client #endif // DAWNWIRE_CLIENT_DEVICE_H_ diff --git a/src/dawn_wire/client/Instance.cpp b/src/dawn_wire/client/Instance.cpp index 9b69d3379a..87189083ae 100644 --- a/src/dawn_wire/client/Instance.cpp +++ b/src/dawn_wire/client/Instance.cpp @@ -16,7 +16,7 @@ #include "dawn_wire/client/Client.h" -namespace dawn_wire::client { +namespace dawn::wire::client { Instance::~Instance() { mRequestAdapterRequests.CloseAll([](RequestAdapterData* request) { @@ -98,4 +98,4 @@ namespace dawn_wire::client { return true; } -} // namespace dawn_wire::client +} // namespace dawn::wire::client diff --git a/src/dawn_wire/client/Instance.h b/src/dawn_wire/client/Instance.h index 964523b93d..bd2a1f2e64 100644 --- a/src/dawn_wire/client/Instance.h +++ b/src/dawn_wire/client/Instance.h @@ -22,7 +22,7 @@ #include "dawn_wire/client/ObjectBase.h" #include "dawn_wire/client/RequestTracker.h" -namespace dawn_wire::client { +namespace dawn::wire::client { class Instance final : public ObjectBase { public: @@ -51,6 +51,6 @@ namespace dawn_wire::client { RequestTracker mRequestAdapterRequests; }; -} // namespace dawn_wire::client +} // namespace dawn::wire::client #endif // DAWNWIRE_CLIENT_INSTANCE_H_ diff --git a/src/dawn_wire/client/LimitsAndFeatures.cpp b/src/dawn_wire/client/LimitsAndFeatures.cpp index 2579ef7bb6..96d4c63353 100644 --- a/src/dawn_wire/client/LimitsAndFeatures.cpp +++ b/src/dawn_wire/client/LimitsAndFeatures.cpp @@ -17,7 +17,7 @@ #include "common/Assert.h" #include "dawn_wire/SupportedFeatures.h" -namespace dawn_wire::client { +namespace dawn::wire::client { bool LimitsAndFeatures::GetLimits(WGPUSupportedLimits* limits) const { ASSERT(limits != nullptr); @@ -60,4 +60,4 @@ namespace dawn_wire::client { } } -} // namespace dawn_wire::client +} // namespace dawn::wire::client diff --git a/src/dawn_wire/client/LimitsAndFeatures.h b/src/dawn_wire/client/LimitsAndFeatures.h index 52dcbbf6f9..e6c07e5487 100644 --- a/src/dawn_wire/client/LimitsAndFeatures.h +++ b/src/dawn_wire/client/LimitsAndFeatures.h @@ -19,7 +19,7 @@ #include -namespace dawn_wire::client { +namespace dawn::wire::client { class LimitsAndFeatures { public: @@ -35,6 +35,6 @@ namespace dawn_wire::client { std::unordered_set mFeatures; }; -} // namespace dawn_wire::client +} // namespace dawn::wire::client #endif // DAWNWIRE_CLIENT_LIMITSANDFEATURES_H_ diff --git a/src/dawn_wire/client/ObjectAllocator.h b/src/dawn_wire/client/ObjectAllocator.h index a2efd3bffb..3876e7e061 100644 --- a/src/dawn_wire/client/ObjectAllocator.h +++ b/src/dawn_wire/client/ObjectAllocator.h @@ -23,7 +23,7 @@ #include #include -namespace dawn_wire::client { +namespace dawn::wire::client { template class ObjectAllocator { @@ -105,6 +105,6 @@ namespace dawn_wire::client { std::vector mFreeIds; std::vector mObjects; }; -} // namespace dawn_wire::client +} // namespace dawn::wire::client #endif // DAWNWIRE_CLIENT_OBJECTALLOCATOR_H_ diff --git a/src/dawn_wire/client/ObjectBase.h b/src/dawn_wire/client/ObjectBase.h index ac6ae273c6..1a023f8fbe 100644 --- a/src/dawn_wire/client/ObjectBase.h +++ b/src/dawn_wire/client/ObjectBase.h @@ -20,7 +20,7 @@ #include "common/LinkedList.h" #include "dawn_wire/ObjectType_autogen.h" -namespace dawn_wire::client { +namespace dawn::wire::client { class Client; @@ -46,6 +46,6 @@ namespace dawn_wire::client { const uint32_t id; }; -} // namespace dawn_wire::client +} // namespace dawn::wire::client #endif // DAWNWIRE_CLIENT_OBJECTBASE_H_ diff --git a/src/dawn_wire/client/Queue.cpp b/src/dawn_wire/client/Queue.cpp index 1875b25075..0de181e53e 100644 --- a/src/dawn_wire/client/Queue.cpp +++ b/src/dawn_wire/client/Queue.cpp @@ -17,7 +17,7 @@ #include "dawn_wire/client/Client.h" #include "dawn_wire/client/Device.h" -namespace dawn_wire::client { +namespace dawn::wire::client { Queue::~Queue() { ClearAllCallbacks(WGPUQueueWorkDoneStatus_Unknown); @@ -95,4 +95,4 @@ namespace dawn_wire::client { }); } -} // namespace dawn_wire::client +} // namespace dawn::wire::client diff --git a/src/dawn_wire/client/Queue.h b/src/dawn_wire/client/Queue.h index 2d177361be..4eb653a286 100644 --- a/src/dawn_wire/client/Queue.h +++ b/src/dawn_wire/client/Queue.h @@ -21,7 +21,7 @@ #include "dawn_wire/client/ObjectBase.h" #include "dawn_wire/client/RequestTracker.h" -namespace dawn_wire::client { +namespace dawn::wire::client { class Queue final : public ObjectBase { public: @@ -52,6 +52,6 @@ namespace dawn_wire::client { RequestTracker mOnWorkDoneRequests; }; -} // namespace dawn_wire::client +} // namespace dawn::wire::client #endif // DAWNWIRE_CLIENT_QUEUE_H_ diff --git a/src/dawn_wire/client/RequestTracker.h b/src/dawn_wire/client/RequestTracker.h index 892803389a..59aedce2da 100644 --- a/src/dawn_wire/client/RequestTracker.h +++ b/src/dawn_wire/client/RequestTracker.h @@ -21,7 +21,7 @@ #include #include -namespace dawn_wire::client { +namespace dawn::wire::client { class Device; class MemoryTransferService; @@ -77,6 +77,6 @@ namespace dawn_wire::client { std::map mRequests; }; -} // namespace dawn_wire::client +} // namespace dawn::wire::client #endif // DAWNWIRE_CLIENT_REQUESTTRACKER_H_ diff --git a/src/dawn_wire/client/ShaderModule.cpp b/src/dawn_wire/client/ShaderModule.cpp index 1e491b2e1d..23433ff99c 100644 --- a/src/dawn_wire/client/ShaderModule.cpp +++ b/src/dawn_wire/client/ShaderModule.cpp @@ -16,7 +16,7 @@ #include "dawn_wire/client/Client.h" -namespace dawn_wire::client { +namespace dawn::wire::client { ShaderModule::~ShaderModule() { ClearAllCallbacks(WGPUCompilationInfoRequestStatus_Unknown); @@ -61,4 +61,4 @@ namespace dawn_wire::client { }); } -} // namespace dawn_wire::client +} // namespace dawn::wire::client diff --git a/src/dawn_wire/client/ShaderModule.h b/src/dawn_wire/client/ShaderModule.h index 2359be3778..077dfd47a0 100644 --- a/src/dawn_wire/client/ShaderModule.h +++ b/src/dawn_wire/client/ShaderModule.h @@ -20,7 +20,7 @@ #include "dawn_wire/client/ObjectBase.h" #include "dawn_wire/client/RequestTracker.h" -namespace dawn_wire::client { +namespace dawn::wire::client { class ShaderModule final : public ObjectBase { public: @@ -43,6 +43,6 @@ namespace dawn_wire::client { RequestTracker mCompilationInfoRequests; }; -} // namespace dawn_wire::client +} // namespace dawn::wire::client #endif // DAWNWIRE_CLIENT_SHADER_MODULE_H_ diff --git a/src/dawn_wire/server/ObjectStorage.h b/src/dawn_wire/server/ObjectStorage.h index c48235ef2d..dd373f287e 100644 --- a/src/dawn_wire/server/ObjectStorage.h +++ b/src/dawn_wire/server/ObjectStorage.h @@ -22,7 +22,7 @@ #include #include -namespace dawn_wire::server { +namespace dawn::wire::server { struct DeviceInfo { std::unordered_set childObjectTypesAndIds; @@ -223,6 +223,6 @@ namespace dawn_wire::server { std::map mTable; }; -} // namespace dawn_wire::server +} // namespace dawn::wire::server #endif // DAWNWIRE_SERVER_OBJECTSTORAGE_H_ diff --git a/src/dawn_wire/server/Server.cpp b/src/dawn_wire/server/Server.cpp index 57da184003..a2d029dd14 100644 --- a/src/dawn_wire/server/Server.cpp +++ b/src/dawn_wire/server/Server.cpp @@ -15,7 +15,7 @@ #include "dawn_wire/server/Server.h" #include "dawn_wire/WireServer.h" -namespace dawn_wire::server { +namespace dawn::wire::server { Server::Server(const DawnProcTable& procs, CommandSerializer* serializer, @@ -210,4 +210,4 @@ namespace dawn_wire::server { return true; } -} // namespace dawn_wire::server +} // namespace dawn::wire::server diff --git a/src/dawn_wire/server/Server.h b/src/dawn_wire/server/Server.h index 69de4ab775..87c7d77d63 100644 --- a/src/dawn_wire/server/Server.h +++ b/src/dawn_wire/server/Server.h @@ -18,7 +18,7 @@ #include "dawn_wire/ChunkedCommandSerializer.h" #include "dawn_wire/server/ServerBase_autogen.h" -namespace dawn_wire::server { +namespace dawn::wire::server { class Server; class MemoryTransferService; @@ -238,6 +238,6 @@ namespace dawn_wire::server { std::unique_ptr CreateInlineMemoryTransferService(); -} // namespace dawn_wire::server +} // namespace dawn::wire::server #endif // DAWNWIRE_SERVER_SERVER_H_ diff --git a/src/dawn_wire/server/ServerAdapter.cpp b/src/dawn_wire/server/ServerAdapter.cpp index 7ec99f438c..cae465ce45 100644 --- a/src/dawn_wire/server/ServerAdapter.cpp +++ b/src/dawn_wire/server/ServerAdapter.cpp @@ -16,7 +16,7 @@ #include "dawn_wire/SupportedFeatures.h" -namespace dawn_wire::server { +namespace dawn::wire::server { bool Server::DoAdapterRequestDevice(ObjectId adapterId, uint64_t requestSerial, @@ -107,4 +107,4 @@ namespace dawn_wire::server { SerializeCommand(cmd); } -} // namespace dawn_wire::server +} // namespace dawn::wire::server diff --git a/src/dawn_wire/server/ServerBuffer.cpp b/src/dawn_wire/server/ServerBuffer.cpp index 03192f625f..c6eca064ca 100644 --- a/src/dawn_wire/server/ServerBuffer.cpp +++ b/src/dawn_wire/server/ServerBuffer.cpp @@ -19,7 +19,7 @@ #include -namespace dawn_wire::server { +namespace dawn::wire::server { bool Server::PreHandleBufferUnmap(const BufferUnmapCmd& cmd) { auto* buffer = BufferObjects().Get(cmd.selfId); @@ -279,4 +279,4 @@ namespace dawn_wire::server { }); } -} // namespace dawn_wire::server +} // namespace dawn::wire::server diff --git a/src/dawn_wire/server/ServerDevice.cpp b/src/dawn_wire/server/ServerDevice.cpp index 6a52411df1..d4c40877e8 100644 --- a/src/dawn_wire/server/ServerDevice.cpp +++ b/src/dawn_wire/server/ServerDevice.cpp @@ -14,7 +14,7 @@ #include "dawn_wire/server/Server.h" -namespace dawn_wire::server { +namespace dawn::wire::server { namespace { @@ -201,4 +201,4 @@ namespace dawn_wire::server { SerializeCommand(cmd); } -} // namespace dawn_wire::server +} // namespace dawn::wire::server diff --git a/src/dawn_wire/server/ServerInlineMemoryTransferService.cpp b/src/dawn_wire/server/ServerInlineMemoryTransferService.cpp index 2fcbad76c1..5dd9281e91 100644 --- a/src/dawn_wire/server/ServerInlineMemoryTransferService.cpp +++ b/src/dawn_wire/server/ServerInlineMemoryTransferService.cpp @@ -18,7 +18,7 @@ #include -namespace dawn_wire::server { +namespace dawn::wire::server { class InlineMemoryTransferService : public MemoryTransferService { public: @@ -91,4 +91,4 @@ namespace dawn_wire::server { return std::make_unique(); } -} // namespace dawn_wire::server +} // namespace dawn::wire::server diff --git a/src/dawn_wire/server/ServerInstance.cpp b/src/dawn_wire/server/ServerInstance.cpp index b6bb88b6ef..1a0f517eb8 100644 --- a/src/dawn_wire/server/ServerInstance.cpp +++ b/src/dawn_wire/server/ServerInstance.cpp @@ -18,7 +18,7 @@ #include -namespace dawn_wire::server { +namespace dawn::wire::server { bool Server::DoInstanceRequestAdapter(ObjectId instanceId, uint64_t requestSerial, @@ -97,4 +97,4 @@ namespace dawn_wire::server { SerializeCommand(cmd); } -} // namespace dawn_wire::server +} // namespace dawn::wire::server diff --git a/src/dawn_wire/server/ServerMemoryTransferService_mock.cpp b/src/dawn_wire/server/ServerMemoryTransferService_mock.cpp index 0bb1442f62..b52e8f7bbf 100644 --- a/src/dawn_wire/server/ServerMemoryTransferService_mock.cpp +++ b/src/dawn_wire/server/ServerMemoryTransferService_mock.cpp @@ -16,7 +16,7 @@ #include "common/Assert.h" -namespace dawn_wire::server { +namespace dawn::wire::server { MockMemoryTransferService::MockReadHandle::MockReadHandle(MockMemoryTransferService* service) : ReadHandle(), mService(service) { @@ -88,4 +88,4 @@ namespace dawn_wire::server { return new MockWriteHandle(this); } -} // namespace dawn_wire::server +} // namespace dawn::wire::server diff --git a/src/dawn_wire/server/ServerMemoryTransferService_mock.h b/src/dawn_wire/server/ServerMemoryTransferService_mock.h index 36510e6d2f..293a9c0414 100644 --- a/src/dawn_wire/server/ServerMemoryTransferService_mock.h +++ b/src/dawn_wire/server/ServerMemoryTransferService_mock.h @@ -20,7 +20,7 @@ #include "dawn_wire/WireServer.h" #include "dawn_wire/server/Server.h" -namespace dawn_wire::server { +namespace dawn::wire::server { class MockMemoryTransferService : public MemoryTransferService { public: @@ -103,6 +103,6 @@ namespace dawn_wire::server { MOCK_METHOD(void, OnWriteHandleDestroy, (const WriteHandle* writeHandle)); }; -} // namespace dawn_wire::server +} // namespace dawn::wire::server #endif // DAWNWIRE_SERVER_SERVERMEMORYTRANSFERSERVICE_MOCK_H_ diff --git a/src/dawn_wire/server/ServerQueue.cpp b/src/dawn_wire/server/ServerQueue.cpp index 656c833f05..5d9292186e 100644 --- a/src/dawn_wire/server/ServerQueue.cpp +++ b/src/dawn_wire/server/ServerQueue.cpp @@ -15,7 +15,7 @@ #include "common/Assert.h" #include "dawn_wire/server/Server.h" -namespace dawn_wire::server { +namespace dawn::wire::server { void Server::OnQueueWorkDone(QueueWorkDoneUserdata* data, WGPUQueueWorkDoneStatus status) { ReturnQueueWorkDoneCallbackCmd cmd; @@ -100,4 +100,4 @@ namespace dawn_wire::server { return true; } -} // namespace dawn_wire::server +} // namespace dawn::wire::server diff --git a/src/dawn_wire/server/ServerShaderModule.cpp b/src/dawn_wire/server/ServerShaderModule.cpp index 072ad73d39..a213ae9bbd 100644 --- a/src/dawn_wire/server/ServerShaderModule.cpp +++ b/src/dawn_wire/server/ServerShaderModule.cpp @@ -16,7 +16,7 @@ #include -namespace dawn_wire::server { +namespace dawn::wire::server { bool Server::DoShaderModuleGetCompilationInfo(ObjectId shaderModuleId, uint64_t requestSerial) { auto* shaderModule = ShaderModuleObjects().Get(shaderModuleId); @@ -46,4 +46,4 @@ namespace dawn_wire::server { SerializeCommand(cmd); } -} // namespace dawn_wire::server +} // namespace dawn::wire::server diff --git a/src/fuzzers/DawnWireServerFuzzer.cpp b/src/fuzzers/DawnWireServerFuzzer.cpp index 86bfae3a82..e514304775 100644 --- a/src/fuzzers/DawnWireServerFuzzer.cpp +++ b/src/fuzzers/DawnWireServerFuzzer.cpp @@ -28,7 +28,7 @@ namespace { - class DevNull : public dawn_wire::CommandSerializer { + class DevNull : public dawn::wire::CommandSerializer { public: size_t GetMaximumAllocationSize() const override { // Some fuzzer bots have a 2GB allocation limit. Pick a value reasonably below that. @@ -116,11 +116,11 @@ int DawnWireServerFuzzer::Run(const uint8_t* data, } DevNull devNull; - dawn_wire::WireServerDescriptor serverDesc = {}; + dawn::wire::WireServerDescriptor serverDesc = {}; serverDesc.procs = &procs; serverDesc.serializer = &devNull; - std::unique_ptr wireServer(new dawn_wire::WireServer(serverDesc)); + std::unique_ptr wireServer(new dawn_wire::WireServer(serverDesc)); wireServer->InjectDevice(device.Get(), 1, 0); wireServer->HandleCommands(reinterpret_cast(data), size); diff --git a/src/include/dawn_platform/DawnPlatform.h b/src/include/dawn_platform/DawnPlatform.h index 4245b289a0..1cf9740fea 100644 --- a/src/include/dawn_platform/DawnPlatform.h +++ b/src/include/dawn_platform/DawnPlatform.h @@ -113,6 +113,7 @@ namespace dawn::platform { } // namespace dawn::platform +// TODO(dawn:824): Remove once the deprecation period is passed. namespace dawn_platform = dawn::platform; #endif // DAWNPLATFORM_DAWNPLATFORM_H_ diff --git a/src/include/dawn_wire/Wire.h b/src/include/dawn_wire/Wire.h index 0c11d91d0c..1fa6239091 100644 --- a/src/include/dawn_wire/Wire.h +++ b/src/include/dawn_wire/Wire.h @@ -21,7 +21,7 @@ #include "dawn/webgpu.h" #include "dawn_wire/dawn_wire_export.h" -namespace dawn_wire { +namespace dawn::wire { class DAWN_WIRE_EXPORT CommandSerializer { public: @@ -71,6 +71,9 @@ namespace dawn_wire { const volatile char* deserializeBuffer, size_t deserializeBufferSize); -} // namespace dawn_wire +} // namespace dawn::wire + +// TODO(dawn:824): Remove once the deprecation period is passed. +namespace dawn_wire = dawn::wire; #endif // DAWNWIRE_WIRE_H_ diff --git a/src/include/dawn_wire/WireClient.h b/src/include/dawn_wire/WireClient.h index 1c10e0752b..9917ed0fb3 100644 --- a/src/include/dawn_wire/WireClient.h +++ b/src/include/dawn_wire/WireClient.h @@ -21,7 +21,7 @@ #include #include -namespace dawn_wire { +namespace dawn::wire { namespace client { class Client; @@ -178,6 +178,6 @@ namespace dawn_wire { // Backdoor to get the order of the ProcMap for testing DAWN_WIRE_EXPORT std::vector GetProcMapNamesForTesting(); } // namespace client -} // namespace dawn_wire +} // namespace dawn::wire #endif // DAWNWIRE_WIRECLIENT_H_ diff --git a/src/include/dawn_wire/WireServer.h b/src/include/dawn_wire/WireServer.h index a720874570..0166e931e0 100644 --- a/src/include/dawn_wire/WireServer.h +++ b/src/include/dawn_wire/WireServer.h @@ -21,7 +21,7 @@ struct DawnProcTable; -namespace dawn_wire { +namespace dawn::wire { namespace server { class Server; @@ -145,6 +145,6 @@ namespace dawn_wire { }; } // namespace server -} // namespace dawn_wire +} // namespace dawn::wire #endif // DAWNWIRE_WIRESERVER_H_ diff --git a/src/tests/DawnTest.h b/src/tests/DawnTest.h index 5496bb7a90..e79a3e467d 100644 --- a/src/tests/DawnTest.h +++ b/src/tests/DawnTest.h @@ -201,11 +201,11 @@ namespace detail { class ExpectBetweenColors; } // namespace detail -namespace dawn_wire { +namespace dawn::wire { class CommandHandler; class WireClient; class WireServer; -} // namespace dawn_wire +} // namespace dawn::wire void InitDawnEnd2EndTestEnvironment(int argc, char** argv); diff --git a/src/tests/unittests/GetProcAddressTests.cpp b/src/tests/unittests/GetProcAddressTests.cpp index e2c6afd0ae..1305dbc8b9 100644 --- a/src/tests/unittests/GetProcAddressTests.cpp +++ b/src/tests/unittests/GetProcAddressTests.cpp @@ -67,12 +67,12 @@ namespace { case DawnFlavor::Wire: { mC2sBuf = std::make_unique(); - dawn_wire::WireClientDescriptor clientDesc = {}; + dawn::wire::WireClientDescriptor clientDesc = {}; clientDesc.serializer = mC2sBuf.get(); - mWireClient = std::make_unique(clientDesc); + mWireClient = std::make_unique(clientDesc); mDevice = wgpu::Device::Acquire(mWireClient->ReserveDevice().device); - mProcs = dawn_wire::client::GetProcs(); + mProcs = dawn::wire::client::GetProcs(); break; } @@ -94,7 +94,7 @@ namespace { dawn_native::null::Adapter mNativeAdapter; std::unique_ptr mC2sBuf; - std::unique_ptr mWireClient; + std::unique_ptr mWireClient; wgpu::Device mDevice; DawnProcTable mProcs; @@ -162,7 +162,7 @@ namespace { } TEST(GetProcAddressInternalTests, CheckDawnWireClientProcMapOrder) { - std::vector names = dawn_wire::client::GetProcMapNamesForTesting(); + std::vector names = dawn::wire::client::GetProcMapNamesForTesting(); for (size_t i = 1; i < names.size(); i++) { ASSERT_LT(std::string(names[i - 1]), std::string(names[i])); } diff --git a/src/tests/unittests/wire/WireAdapterTests.cpp b/src/tests/unittests/wire/WireAdapterTests.cpp index 48b0a7f1d0..1289bbd5b4 100644 --- a/src/tests/unittests/wire/WireAdapterTests.cpp +++ b/src/tests/unittests/wire/WireAdapterTests.cpp @@ -25,7 +25,7 @@ namespace { using namespace testing; - using namespace dawn_wire; + using namespace dawn::wire; class WireAdapterTests : public WireTest { protected: diff --git a/src/tests/unittests/wire/WireArgumentTests.cpp b/src/tests/unittests/wire/WireArgumentTests.cpp index 4d21fa772d..01827ffd37 100644 --- a/src/tests/unittests/wire/WireArgumentTests.cpp +++ b/src/tests/unittests/wire/WireArgumentTests.cpp @@ -19,7 +19,7 @@ #include using namespace testing; -using namespace dawn_wire; +using namespace dawn::wire; class WireArgumentTests : public WireTest { public: diff --git a/src/tests/unittests/wire/WireBasicTests.cpp b/src/tests/unittests/wire/WireBasicTests.cpp index e14a5967bf..878b18494d 100644 --- a/src/tests/unittests/wire/WireBasicTests.cpp +++ b/src/tests/unittests/wire/WireBasicTests.cpp @@ -15,7 +15,7 @@ #include "tests/unittests/wire/WireTest.h" using namespace testing; -using namespace dawn_wire; +using namespace dawn::wire; class WireBasicTests : public WireTest { public: diff --git a/src/tests/unittests/wire/WireBufferMappingTests.cpp b/src/tests/unittests/wire/WireBufferMappingTests.cpp index 582cff8014..64b5d0ccab 100644 --- a/src/tests/unittests/wire/WireBufferMappingTests.cpp +++ b/src/tests/unittests/wire/WireBufferMappingTests.cpp @@ -17,7 +17,7 @@ #include "dawn_wire/WireClient.h" using namespace testing; -using namespace dawn_wire; +using namespace dawn::wire; namespace { diff --git a/src/tests/unittests/wire/WireCreatePipelineAsyncTests.cpp b/src/tests/unittests/wire/WireCreatePipelineAsyncTests.cpp index 78f7f8fd16..43de006220 100644 --- a/src/tests/unittests/wire/WireCreatePipelineAsyncTests.cpp +++ b/src/tests/unittests/wire/WireCreatePipelineAsyncTests.cpp @@ -17,7 +17,7 @@ #include "dawn_wire/WireClient.h" using namespace testing; -using namespace dawn_wire; +using namespace dawn::wire; namespace { diff --git a/src/tests/unittests/wire/WireDestroyObjectTests.cpp b/src/tests/unittests/wire/WireDestroyObjectTests.cpp index beb2e03acb..7850eda560 100644 --- a/src/tests/unittests/wire/WireDestroyObjectTests.cpp +++ b/src/tests/unittests/wire/WireDestroyObjectTests.cpp @@ -16,7 +16,7 @@ #include "tests/unittests/wire/WireTest.h" using namespace testing; -using namespace dawn_wire; +using namespace dawn::wire; class WireDestroyObjectTests : public WireTest {}; diff --git a/src/tests/unittests/wire/WireDisconnectTests.cpp b/src/tests/unittests/wire/WireDisconnectTests.cpp index fee5858a41..24344ca7c3 100644 --- a/src/tests/unittests/wire/WireDisconnectTests.cpp +++ b/src/tests/unittests/wire/WireDisconnectTests.cpp @@ -19,7 +19,7 @@ #include "tests/MockCallback.h" using namespace testing; -using namespace dawn_wire; +using namespace dawn::wire; namespace { diff --git a/src/tests/unittests/wire/WireErrorCallbackTests.cpp b/src/tests/unittests/wire/WireErrorCallbackTests.cpp index 32ba5f56c4..4469674d19 100644 --- a/src/tests/unittests/wire/WireErrorCallbackTests.cpp +++ b/src/tests/unittests/wire/WireErrorCallbackTests.cpp @@ -17,7 +17,7 @@ #include "dawn_wire/WireClient.h" using namespace testing; -using namespace dawn_wire; +using namespace dawn::wire; namespace { diff --git a/src/tests/unittests/wire/WireExtensionTests.cpp b/src/tests/unittests/wire/WireExtensionTests.cpp index dabab2cf2a..cb155a63c0 100644 --- a/src/tests/unittests/wire/WireExtensionTests.cpp +++ b/src/tests/unittests/wire/WireExtensionTests.cpp @@ -15,7 +15,7 @@ #include "tests/unittests/wire/WireTest.h" using namespace testing; -using namespace dawn_wire; +using namespace dawn::wire; class WireExtensionTests : public WireTest { public: diff --git a/src/tests/unittests/wire/WireInjectDeviceTests.cpp b/src/tests/unittests/wire/WireInjectDeviceTests.cpp index 21f91104d8..42cfec6308 100644 --- a/src/tests/unittests/wire/WireInjectDeviceTests.cpp +++ b/src/tests/unittests/wire/WireInjectDeviceTests.cpp @@ -18,7 +18,7 @@ #include "dawn_wire/WireServer.h" using namespace testing; -using namespace dawn_wire; +using namespace dawn::wire; class WireInjectDeviceTests : public WireTest { public: diff --git a/src/tests/unittests/wire/WireInjectInstanceTests.cpp b/src/tests/unittests/wire/WireInjectInstanceTests.cpp index 05502f56f9..5f9fe2bc13 100644 --- a/src/tests/unittests/wire/WireInjectInstanceTests.cpp +++ b/src/tests/unittests/wire/WireInjectInstanceTests.cpp @@ -18,7 +18,7 @@ #include "dawn_wire/WireServer.h" using namespace testing; -using namespace dawn_wire; +using namespace dawn::wire; namespace { diff --git a/src/tests/unittests/wire/WireInjectSwapChainTests.cpp b/src/tests/unittests/wire/WireInjectSwapChainTests.cpp index 6c3e104e7d..a002580a8d 100644 --- a/src/tests/unittests/wire/WireInjectSwapChainTests.cpp +++ b/src/tests/unittests/wire/WireInjectSwapChainTests.cpp @@ -18,7 +18,7 @@ #include "dawn_wire/WireServer.h" using namespace testing; -using namespace dawn_wire; +using namespace dawn::wire; class WireInjectSwapChainTests : public WireTest { public: diff --git a/src/tests/unittests/wire/WireInjectTextureTests.cpp b/src/tests/unittests/wire/WireInjectTextureTests.cpp index d8df43afd7..27fd843f2e 100644 --- a/src/tests/unittests/wire/WireInjectTextureTests.cpp +++ b/src/tests/unittests/wire/WireInjectTextureTests.cpp @@ -18,7 +18,7 @@ #include "dawn_wire/WireServer.h" using namespace testing; -using namespace dawn_wire; +using namespace dawn::wire; class WireInjectTextureTests : public WireTest { public: diff --git a/src/tests/unittests/wire/WireInstanceTests.cpp b/src/tests/unittests/wire/WireInstanceTests.cpp index 6ef0a4cf9f..9f2ac582cd 100644 --- a/src/tests/unittests/wire/WireInstanceTests.cpp +++ b/src/tests/unittests/wire/WireInstanceTests.cpp @@ -25,7 +25,7 @@ namespace { using namespace testing; - using namespace dawn_wire; + using namespace dawn::wire; class WireInstanceBasicTest : public WireTest {}; class WireInstanceTests : public WireTest { diff --git a/src/tests/unittests/wire/WireMemoryTransferServiceTests.cpp b/src/tests/unittests/wire/WireMemoryTransferServiceTests.cpp index 756dcc04a1..b987ad3cf3 100644 --- a/src/tests/unittests/wire/WireMemoryTransferServiceTests.cpp +++ b/src/tests/unittests/wire/WireMemoryTransferServiceTests.cpp @@ -18,7 +18,7 @@ #include "dawn_wire/server/ServerMemoryTransferService_mock.h" using namespace testing; -using namespace dawn_wire; +using namespace dawn::wire; namespace { @@ -314,8 +314,8 @@ class WireMemoryTransferServiceTests : public WireTest { // mUpdatedBufferContent| after all writes are flushed. static uint32_t mUpdatedBufferContent; - testing::StrictMock serverMemoryTransferService; - testing::StrictMock clientMemoryTransferService; + testing::StrictMock serverMemoryTransferService; + testing::StrictMock clientMemoryTransferService; }; uint32_t WireMemoryTransferServiceTests::mBufferContent = 1337; diff --git a/src/tests/unittests/wire/WireOptionalTests.cpp b/src/tests/unittests/wire/WireOptionalTests.cpp index c52c5ac361..e5da98f24a 100644 --- a/src/tests/unittests/wire/WireOptionalTests.cpp +++ b/src/tests/unittests/wire/WireOptionalTests.cpp @@ -15,7 +15,7 @@ #include "tests/unittests/wire/WireTest.h" using namespace testing; -using namespace dawn_wire; +using namespace dawn::wire; class WireOptionalTests : public WireTest { public: diff --git a/src/tests/unittests/wire/WireQueueTests.cpp b/src/tests/unittests/wire/WireQueueTests.cpp index 6045e4fc08..1aba0b251e 100644 --- a/src/tests/unittests/wire/WireQueueTests.cpp +++ b/src/tests/unittests/wire/WireQueueTests.cpp @@ -17,7 +17,7 @@ #include "dawn_wire/WireClient.h" using namespace testing; -using namespace dawn_wire; +using namespace dawn::wire; class MockQueueWorkDoneCallback { public: diff --git a/src/tests/unittests/wire/WireShaderModuleTests.cpp b/src/tests/unittests/wire/WireShaderModuleTests.cpp index d7d58d877f..e123346683 100644 --- a/src/tests/unittests/wire/WireShaderModuleTests.cpp +++ b/src/tests/unittests/wire/WireShaderModuleTests.cpp @@ -17,7 +17,7 @@ #include "dawn_wire/WireClient.h" using namespace testing; -using namespace dawn_wire; +using namespace dawn::wire; namespace { diff --git a/src/tests/unittests/wire/WireTest.cpp b/src/tests/unittests/wire/WireTest.cpp index db6432530b..aedc8b1740 100644 --- a/src/tests/unittests/wire/WireTest.cpp +++ b/src/tests/unittests/wire/WireTest.cpp @@ -20,7 +20,7 @@ #include "utils/TerribleCommandBuffer.h" using namespace testing; -using namespace dawn_wire; +using namespace dawn::wire; WireTest::WireTest() { } @@ -65,7 +65,7 @@ void WireTest::SetUp() { mWireClient.reset(new WireClient(clientDesc)); mS2cBuf->SetHandler(mWireClient.get()); - dawnProcSetProcs(&dawn_wire::client::GetProcs()); + dawnProcSetProcs(&dawn::wire::client::GetProcs()); auto deviceReservation = mWireClient->ReserveDevice(); EXPECT_CALL(api, DeviceReference(mockDevice)); @@ -120,11 +120,11 @@ void WireTest::FlushServer(bool success) { ASSERT_EQ(mS2cBuf->Flush(), success); } -dawn_wire::WireServer* WireTest::GetWireServer() { +dawn::wire::WireServer* WireTest::GetWireServer() { return mWireServer.get(); } -dawn_wire::WireClient* WireTest::GetWireClient() { +dawn::wire::WireClient* WireTest::GetWireClient() { return mWireClient.get(); } diff --git a/src/tests/unittests/wire/WireTest.h b/src/tests/unittests/wire/WireTest.h index 03ac641168..235dcf5f80 100644 --- a/src/tests/unittests/wire/WireTest.h +++ b/src/tests/unittests/wire/WireTest.h @@ -97,7 +97,7 @@ inline testing::Matcher ValidStringMessage() { return MakeMatcher(new StringMessageMatcher()); } -namespace dawn_wire { +namespace dawn::wire { class WireClient; class WireServer; namespace client { @@ -106,7 +106,7 @@ namespace dawn_wire { namespace server { class MemoryTransferService; } // namespace server -} // namespace dawn_wire +} // namespace dawn::wire namespace utils { class TerribleCommandBuffer; @@ -131,8 +131,8 @@ class WireTest : public testing::Test { WGPUDevice device; WGPUQueue queue; - dawn_wire::WireServer* GetWireServer(); - dawn_wire::WireClient* GetWireClient(); + dawn::wire::WireServer* GetWireServer(); + dawn::wire::WireClient* GetWireClient(); void DeleteServer(); void DeleteClient(); @@ -140,11 +140,11 @@ class WireTest : public testing::Test { private: void SetupIgnoredCallExpectations(); - virtual dawn_wire::client::MemoryTransferService* GetClientMemoryTransferService(); - virtual dawn_wire::server::MemoryTransferService* GetServerMemoryTransferService(); + virtual dawn::wire::client::MemoryTransferService* GetClientMemoryTransferService(); + virtual dawn::wire::server::MemoryTransferService* GetServerMemoryTransferService(); - std::unique_ptr mWireServer; - std::unique_ptr mWireClient; + std::unique_ptr mWireServer; + std::unique_ptr mWireClient; std::unique_ptr mS2cBuf; std::unique_ptr mC2sBuf; }; diff --git a/src/tests/unittests/wire/WireWGPUDevicePropertiesTests.cpp b/src/tests/unittests/wire/WireWGPUDevicePropertiesTests.cpp index 57fe37f175..dd0023cea9 100644 --- a/src/tests/unittests/wire/WireWGPUDevicePropertiesTests.cpp +++ b/src/tests/unittests/wire/WireWGPUDevicePropertiesTests.cpp @@ -28,14 +28,14 @@ TEST_F(WireWGPUDevicePropertiesTests, SerializeWGPUDeviceProperties) { sentWGPUDeviceProperties.timestampQuery = true; size_t sentWGPUDevicePropertiesSize = - dawn_wire::SerializedWGPUDevicePropertiesSize(&sentWGPUDeviceProperties); + dawn::wire::SerializedWGPUDevicePropertiesSize(&sentWGPUDeviceProperties); std::vector buffer; buffer.resize(sentWGPUDevicePropertiesSize); - dawn_wire::SerializeWGPUDeviceProperties(&sentWGPUDeviceProperties, buffer.data()); + dawn::wire::SerializeWGPUDeviceProperties(&sentWGPUDeviceProperties, buffer.data()); WGPUDeviceProperties receivedWGPUDeviceProperties; - ASSERT_TRUE(dawn_wire::DeserializeWGPUDeviceProperties(&receivedWGPUDeviceProperties, - buffer.data(), buffer.size())); + ASSERT_TRUE(dawn::wire::DeserializeWGPUDeviceProperties(&receivedWGPUDeviceProperties, + buffer.data(), buffer.size())); ASSERT_TRUE(receivedWGPUDeviceProperties.textureCompressionBC); ASSERT_FALSE(receivedWGPUDeviceProperties.pipelineStatisticsQuery); ASSERT_TRUE(receivedWGPUDeviceProperties.timestampQuery); @@ -46,12 +46,12 @@ TEST_F(WireWGPUDevicePropertiesTests, DeserializeBufferTooSmall) { WGPUDeviceProperties sentWGPUDeviceProperties = {}; size_t sentWGPUDevicePropertiesSize = - dawn_wire::SerializedWGPUDevicePropertiesSize(&sentWGPUDeviceProperties); + dawn::wire::SerializedWGPUDevicePropertiesSize(&sentWGPUDeviceProperties); std::vector buffer; buffer.resize(sentWGPUDevicePropertiesSize); - dawn_wire::SerializeWGPUDeviceProperties(&sentWGPUDeviceProperties, buffer.data()); + dawn::wire::SerializeWGPUDeviceProperties(&sentWGPUDeviceProperties, buffer.data()); WGPUDeviceProperties receivedWGPUDeviceProperties; - ASSERT_FALSE(dawn_wire::DeserializeWGPUDeviceProperties(&receivedWGPUDeviceProperties, - buffer.data(), buffer.size() - 1)); + ASSERT_FALSE(dawn::wire::DeserializeWGPUDeviceProperties(&receivedWGPUDeviceProperties, + buffer.data(), buffer.size() - 1)); } diff --git a/src/utils/TerribleCommandBuffer.cpp b/src/utils/TerribleCommandBuffer.cpp index 0c06ab1036..9985d6a904 100644 --- a/src/utils/TerribleCommandBuffer.cpp +++ b/src/utils/TerribleCommandBuffer.cpp @@ -21,11 +21,11 @@ namespace utils { TerribleCommandBuffer::TerribleCommandBuffer() { } - TerribleCommandBuffer::TerribleCommandBuffer(dawn_wire::CommandHandler* handler) + TerribleCommandBuffer::TerribleCommandBuffer(dawn::wire::CommandHandler* handler) : mHandler(handler) { } - void TerribleCommandBuffer::SetHandler(dawn_wire::CommandHandler* handler) { + void TerribleCommandBuffer::SetHandler(dawn::wire::CommandHandler* handler) { mHandler = handler; } diff --git a/src/utils/TerribleCommandBuffer.h b/src/utils/TerribleCommandBuffer.h index 45aec93ff3..dd45f635b3 100644 --- a/src/utils/TerribleCommandBuffer.h +++ b/src/utils/TerribleCommandBuffer.h @@ -19,12 +19,12 @@ namespace utils { - class TerribleCommandBuffer : public dawn_wire::CommandSerializer { + class TerribleCommandBuffer : public dawn::wire::CommandSerializer { public: TerribleCommandBuffer(); - TerribleCommandBuffer(dawn_wire::CommandHandler* handler); + TerribleCommandBuffer(dawn::wire::CommandHandler* handler); - void SetHandler(dawn_wire::CommandHandler* handler); + void SetHandler(dawn::wire::CommandHandler* handler); size_t GetMaximumAllocationSize() const override; @@ -32,7 +32,7 @@ namespace utils { bool Flush() override; private: - dawn_wire::CommandHandler* mHandler = nullptr; + dawn::wire::CommandHandler* mHandler = nullptr; size_t mOffset = 0; char mBuffer[1000000]; }; diff --git a/src/utils/WireHelper.cpp b/src/utils/WireHelper.cpp index 32be5cff7c..698385e3d5 100644 --- a/src/utils/WireHelper.cpp +++ b/src/utils/WireHelper.cpp @@ -34,10 +34,10 @@ namespace utils { namespace { - class WireServerTraceLayer : public dawn_wire::CommandHandler { + class WireServerTraceLayer : public dawn::wire::CommandHandler { public: - WireServerTraceLayer(const char* dir, dawn_wire::CommandHandler* handler) - : dawn_wire::CommandHandler(), mDir(dir), mHandler(handler) { + WireServerTraceLayer(const char* dir, dawn::wire::CommandHandler* handler) + : dawn::wire::CommandHandler(), mDir(dir), mHandler(handler) { const char* sep = GetPathSeparator(); if (mDir.size() > 0 && mDir.back() != *sep) { mDir += sep; @@ -75,7 +75,7 @@ namespace utils { private: std::string mDir; - dawn_wire::CommandHandler* mHandler; + dawn::wire::CommandHandler* mHandler; std::ofstream mFile; }; @@ -108,11 +108,11 @@ namespace utils { mC2sBuf = std::make_unique(); mS2cBuf = std::make_unique(); - dawn_wire::WireServerDescriptor serverDesc = {}; + dawn::wire::WireServerDescriptor serverDesc = {}; serverDesc.procs = &dawn_native::GetProcs(); serverDesc.serializer = mS2cBuf.get(); - mWireServer.reset(new dawn_wire::WireServer(serverDesc)); + mWireServer.reset(new dawn::wire::WireServer(serverDesc)); mC2sBuf->SetHandler(mWireServer.get()); if (wireTraceDir != nullptr && strlen(wireTraceDir) > 0) { @@ -121,12 +121,12 @@ namespace utils { mC2sBuf->SetHandler(mWireServerTraceLayer.get()); } - dawn_wire::WireClientDescriptor clientDesc = {}; + dawn::wire::WireClientDescriptor clientDesc = {}; clientDesc.serializer = mC2sBuf.get(); - mWireClient.reset(new dawn_wire::WireClient(clientDesc)); + mWireClient.reset(new dawn::wire::WireClient(clientDesc)); mS2cBuf->SetHandler(mWireClient.get()); - dawnProcSetProcs(&dawn_wire::client::GetProcs()); + dawnProcSetProcs(&dawn::wire::client::GetProcs()); } std::pair RegisterDevice(WGPUDevice backendDevice) override { @@ -157,8 +157,8 @@ namespace utils { std::unique_ptr mC2sBuf; std::unique_ptr mS2cBuf; std::unique_ptr mWireServerTraceLayer; - std::unique_ptr mWireServer; - std::unique_ptr mWireClient; + std::unique_ptr mWireServer; + std::unique_ptr mWireClient; }; } // anonymous namespace