Fixup readability/namespace issues.

This CL fixes a few readability/namespace issues and suppresses one
which is in conflict with the current formatting rules.

Bug: dawn:1339
Change-Id: Ifb688b05d50ebc3e698a77700178f87c93b14a46
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86867
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
This commit is contained in:
dan sinclair 2022-04-20 01:54:25 +00:00 committed by Dawn LUCI CQ
parent b6f4c59845
commit 36af06343c
12 changed files with 24 additions and 23 deletions

View File

@ -1,6 +1,5 @@
filter=-build/namespaces
filter=-readability/casting
filter=-readability/namespace
filter=-readability/todo
filter=-runtime/explicit
filter=-runtime/indentation_namespace

View File

@ -25,7 +25,7 @@ namespace dawn::native::vulkan {
struct VulkanDeviceInfo;
} // namespace dawn::native::vulkan
namespace dawn::native { namespace vulkan::external_memory {
namespace dawn::native::vulkan::external_memory {
struct MemoryImportParams {
VkDeviceSize allocationSize;
@ -73,6 +73,6 @@ namespace dawn::native { namespace vulkan::external_memory {
bool mSupported = false;
};
}} // namespace dawn::native::vulkan::external_memory
} // namespace dawn::native::vulkan::external_memory
#endif // SRC_DAWN_NATIVE_VULKAN_EXTERNAL_MEMORY_MEMORYSERVICE_H_

View File

@ -23,7 +23,7 @@
#include "dawn/native/vulkan/VulkanError.h"
#include "dawn/native/vulkan/external_memory/MemoryService.h"
namespace dawn::native { namespace vulkan::external_memory {
namespace dawn::native::vulkan::external_memory {
namespace {
@ -113,7 +113,7 @@ namespace dawn::native { namespace vulkan::external_memory {
return false;
}
} // anonymous namespace
} // namespace
Service::Service(Device* device)
: mDevice(device), mSupported(CheckSupport(device->GetDeviceInfo())) {
@ -356,4 +356,4 @@ namespace dawn::native { namespace vulkan::external_memory {
return image;
}
}} // namespace dawn::native::vulkan::external_memory
} // namespace dawn::native::vulkan::external_memory

View File

@ -15,7 +15,7 @@
#include "dawn/native/vulkan/DeviceVk.h"
#include "dawn/native/vulkan/external_memory/MemoryService.h"
namespace dawn::native { namespace vulkan::external_memory {
namespace dawn::native::vulkan::external_memory {
Service::Service(Device* device) : mDevice(device) {
DAWN_UNUSED(mDevice);
@ -62,4 +62,4 @@ namespace dawn::native { namespace vulkan::external_memory {
return DAWN_UNIMPLEMENTED_ERROR("Using null memory service to interop inside Vulkan");
}
}} // namespace dawn::native::vulkan::external_memory
} // namespace dawn::native::vulkan::external_memory

View File

@ -21,7 +21,7 @@
#include "dawn/native/vulkan/VulkanError.h"
#include "dawn/native/vulkan/external_memory/MemoryService.h"
namespace dawn::native { namespace vulkan::external_memory {
namespace dawn::native::vulkan::external_memory {
Service::Service(Device* device)
: mDevice(device), mSupported(CheckSupport(device->GetDeviceInfo())) {
@ -157,4 +157,4 @@ namespace dawn::native { namespace vulkan::external_memory {
return image;
}
}} // namespace dawn::native::vulkan::external_memory
} // namespace dawn::native::vulkan::external_memory

View File

@ -21,7 +21,7 @@
#include "dawn/native/vulkan/VulkanError.h"
#include "dawn/native/vulkan/external_memory/MemoryService.h"
namespace dawn::native { namespace vulkan::external_memory {
namespace dawn::native::vulkan::external_memory {
Service::Service(Device* device)
: mDevice(device), mSupported(CheckSupport(device->GetDeviceInfo())) {
@ -159,4 +159,4 @@ namespace dawn::native { namespace vulkan::external_memory {
return image;
}
}} // namespace dawn::native::vulkan::external_memory
} // namespace dawn::native::vulkan::external_memory

View File

@ -25,7 +25,7 @@ namespace dawn::native::vulkan {
class Device;
} // namespace dawn::native::vulkan
namespace dawn::native { namespace vulkan::external_semaphore {
namespace dawn::native::vulkan::external_semaphore {
class Service {
public:
@ -55,6 +55,6 @@ namespace dawn::native { namespace vulkan::external_semaphore {
bool mSupported = false;
};
}} // namespace dawn::native::vulkan::external_semaphore
} // namespace dawn::native::vulkan::external_semaphore
#endif // SRC_DAWN_NATIVE_VULKAN_EXTERNAL_SEMAPHORE_SEMAPHORESERVICE_H_

View File

@ -27,7 +27,7 @@ static constexpr VkExternalSemaphoreHandleTypeFlagBits kHandleType =
VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR;
#endif // defined(DAWN_USE_SYNC_FDS)
namespace dawn::native { namespace vulkan::external_semaphore {
namespace dawn::native::vulkan::external_semaphore {
Service::Service(Device* device)
: mDevice(device),
@ -136,4 +136,4 @@ namespace dawn::native { namespace vulkan::external_semaphore {
return fd;
}
}} // namespace dawn::native::vulkan::external_semaphore
} // namespace dawn::native::vulkan::external_semaphore

View File

@ -15,7 +15,7 @@
#include "dawn/native/vulkan/DeviceVk.h"
#include "dawn/native/vulkan/external_semaphore/SemaphoreService.h"
namespace dawn::native { namespace vulkan::external_semaphore {
namespace dawn::native::vulkan::external_semaphore {
Service::Service(Device* device) : mDevice(device) {
DAWN_UNUSED(mDevice);
@ -47,4 +47,4 @@ namespace dawn::native { namespace vulkan::external_semaphore {
return DAWN_UNIMPLEMENTED_ERROR("Using null semaphore service to interop inside Vulkan");
}
}} // namespace dawn::native::vulkan::external_semaphore
} // namespace dawn::native::vulkan::external_semaphore

View File

@ -20,7 +20,7 @@
#include "dawn/native/vulkan/VulkanError.h"
#include "dawn/native/vulkan/external_semaphore/SemaphoreService.h"
namespace dawn::native { namespace vulkan::external_semaphore {
namespace dawn::native::vulkan::external_semaphore {
Service::Service(Device* device)
: mDevice(device),
@ -134,4 +134,4 @@ namespace dawn::native { namespace vulkan::external_semaphore {
return handle;
}
}} // namespace dawn::native::vulkan::external_semaphore
} // namespace dawn::native::vulkan::external_semaphore

View File

@ -763,4 +763,6 @@ namespace dawn::native { namespace {
EXPECT_FALSE(textureView->IsAlive());
}
// TODO(https://crbug.com/dawn/1381) Remove when namespaces are not indented.
// NOLINTNEXTLINE(readability/namespace)
}} // namespace dawn::native::

View File

@ -22,7 +22,7 @@
#include "dawn/utils/ComboRenderPipelineDescriptor.h"
#include "dawn/utils/WGPUHelpers.h"
namespace dawn::native { namespace vulkan {
namespace dawn::native::vulkan {
using ExternalTexture = VulkanImageWrappingTestBackend::ExternalTexture;
using ExternalSemaphore = VulkanImageWrappingTestBackend::ExternalSemaphore;
@ -124,7 +124,7 @@ namespace dawn::native { namespace vulkan {
std::unique_ptr<ExternalTexture> defaultTexture;
};
} // anonymous namespace
} // namespace
using VulkanImageWrappingValidationTests = VulkanImageWrappingTestBase;
@ -885,4 +885,4 @@ namespace dawn::native { namespace vulkan {
DAWN_INSTANTIATE_TEST(VulkanImageWrappingValidationTests, VulkanBackend());
DAWN_INSTANTIATE_TEST(VulkanImageWrappingUsageTests, VulkanBackend());
}} // namespace dawn::native::vulkan
} // namespace dawn::native::vulkan