mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 21:47:47 +00:00
Use C++17 nested namespaces instead of manually nesting them.
This was done with these two commands and a couple manual fixups for
namespaces that had more than one space in the comment in the closing
brace, as well as vulkan_platform.h
git grep -l "namespace .* { namespace " | xargs sed -i "" "s/namespace \(.*\) { namespace /namespace \1::/"
git grep -l "}} // namespace" | xargs sed -i "" "s%}} // namespace%} // namespace%"
Bug: dawn:824
Change-Id: I6f448b820c12fc1004ea5270bf8e1f466b0c0aab
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/75400
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
5984d8d1a8
commit
7f8fa04edc
@@ -28,7 +28,7 @@
|
||||
struct ID3D12Device;
|
||||
struct ID3D12Resource;
|
||||
|
||||
namespace dawn_native { namespace d3d12 {
|
||||
namespace dawn_native::d3d12 {
|
||||
|
||||
class D3D11on12ResourceCache;
|
||||
|
||||
@@ -101,6 +101,6 @@ namespace dawn_native { namespace d3d12 {
|
||||
Microsoft::WRL::ComPtr<IDXGIAdapter> dxgiAdapter;
|
||||
};
|
||||
|
||||
}} // namespace dawn_native::d3d12
|
||||
} // namespace dawn_native::d3d12
|
||||
|
||||
#endif // DAWNNATIVE_D3D12BACKEND_H_
|
||||
|
||||
@@ -32,7 +32,7 @@ typedef __IOSurface* IOSurfaceRef;
|
||||
# import <Metal/Metal.h>
|
||||
#endif //__OBJC__
|
||||
|
||||
namespace dawn_native { namespace metal {
|
||||
namespace dawn_native::metal {
|
||||
|
||||
struct DAWN_NATIVE_EXPORT AdapterDiscoveryOptions : public AdapterDiscoveryOptionsBase {
|
||||
AdapterDiscoveryOptions();
|
||||
@@ -56,14 +56,14 @@ namespace dawn_native { namespace metal {
|
||||
// scheduled could lead to races in who gets scheduled first and incorrect rendering.
|
||||
DAWN_NATIVE_EXPORT void WaitForCommandsToBeScheduled(WGPUDevice device);
|
||||
|
||||
}} // namespace dawn_native::metal
|
||||
} // namespace dawn_native::metal
|
||||
|
||||
#ifdef __OBJC__
|
||||
namespace dawn_native { namespace metal {
|
||||
namespace dawn_native::metal {
|
||||
|
||||
DAWN_NATIVE_EXPORT id<MTLDevice> GetMetalDevice(WGPUDevice device);
|
||||
|
||||
}} // namespace dawn_native::metal
|
||||
} // namespace dawn_native::metal
|
||||
#endif // __OBJC__
|
||||
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
#include <dawn/dawn_wsi.h>
|
||||
#include <dawn_native/DawnNative.h>
|
||||
|
||||
namespace dawn_native { namespace null {
|
||||
namespace dawn_native::null {
|
||||
DAWN_NATIVE_EXPORT DawnSwapChainImplementation CreateNativeSwapChainImpl();
|
||||
}} // namespace dawn_native::null
|
||||
} // namespace dawn_native::null
|
||||
|
||||
#endif // DAWNNATIVE_NULLBACKEND_H_
|
||||
|
||||
@@ -20,7 +20,7 @@ typedef void* EGLImage;
|
||||
#include <dawn/dawn_wsi.h>
|
||||
#include <dawn_native/DawnNative.h>
|
||||
|
||||
namespace dawn_native { namespace opengl {
|
||||
namespace dawn_native::opengl {
|
||||
|
||||
struct DAWN_NATIVE_EXPORT AdapterDiscoveryOptions : public AdapterDiscoveryOptionsBase {
|
||||
AdapterDiscoveryOptions();
|
||||
@@ -50,6 +50,6 @@ namespace dawn_native { namespace opengl {
|
||||
DAWN_NATIVE_EXPORT WGPUTexture
|
||||
WrapExternalEGLImage(WGPUDevice device, const ExternalImageDescriptorEGLImage* descriptor);
|
||||
|
||||
}} // namespace dawn_native::opengl
|
||||
} // namespace dawn_native::opengl
|
||||
|
||||
#endif // DAWNNATIVE_OPENGLBACKEND_H_
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace dawn_native { namespace vulkan {
|
||||
namespace dawn_native::vulkan {
|
||||
|
||||
DAWN_NATIVE_EXPORT VkInstance GetInstance(WGPUDevice device);
|
||||
|
||||
@@ -135,6 +135,6 @@ namespace dawn_native { namespace vulkan {
|
||||
VkImageLayout desiredLayout,
|
||||
ExternalImageExportInfoVk* info);
|
||||
|
||||
}} // namespace dawn_native::vulkan
|
||||
} // namespace dawn_native::vulkan
|
||||
|
||||
#endif // DAWNNATIVE_VULKANBACKEND_H_
|
||||
|
||||
Reference in New Issue
Block a user