From 982188ac164ad1f9e989f1d3539113328d470c85 Mon Sep 17 00:00:00 2001 From: Corentin Wallez Date: Tue, 29 Mar 2022 19:32:23 +0000 Subject: [PATCH] Rename Surface::Type::Xlib to XlibWindow for consistency. Bug: None Change-Id: I2750c2fc86cc893d6f124cf7d539a85458bd4105 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/84761 Auto-Submit: Corentin Wallez Reviewed-by: Austin Eng Commit-Queue: Austin Eng --- src/dawn/native/Surface.cpp | 16 ++++++++-------- src/dawn/native/Surface.h | 2 +- src/dawn/native/vulkan/SwapChainVk.cpp | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/dawn/native/Surface.cpp b/src/dawn/native/Surface.cpp index 378a2756b7..ff6fd07559 100644 --- a/src/dawn/native/Surface.cpp +++ b/src/dawn/native/Surface.cpp @@ -35,6 +35,9 @@ namespace dawn::native { const absl::FormatConversionSpec& spec, absl::FormatSink* s) { switch (value) { + case Surface::Type::AndroidWindow: + s->Append("AndroidWindow"); + break; case Surface::Type::MetalLayer: s->Append("MetalLayer"); break; @@ -47,11 +50,8 @@ namespace dawn::native { case Surface::Type::WindowsSwapChainPanel: s->Append("WindowsSwapChainPanel"); break; - case Surface::Type::Xlib: - s->Append("Xlib"); - break; - case Surface::Type::AndroidWindow: - s->Append("AndroidWindow"); + case Surface::Type::XlibWindow: + s->Append("XlibWindow"); break; } return {true}; @@ -190,7 +190,7 @@ namespace dawn::native { mSwapChainPanel = static_cast(swapChainPanelDesc->swapChainPanel); #endif // defined(DAWN_PLATFORM_WINDOWS) } else if (xDesc) { - mType = Type::Xlib; + mType = Type::XlibWindow; mXDisplay = xDesc->display; mXWindow = xDesc->window; } else { @@ -259,11 +259,11 @@ namespace dawn::native { } void* Surface::GetXDisplay() const { - ASSERT(mType == Type::Xlib); + ASSERT(mType == Type::XlibWindow); return mXDisplay; } uint32_t Surface::GetXWindow() const { - ASSERT(mType == Type::Xlib); + ASSERT(mType == Type::XlibWindow); return mXWindow; } diff --git a/src/dawn/native/Surface.h b/src/dawn/native/Surface.h index 6a6a838739..c5d6185e50 100644 --- a/src/dawn/native/Surface.h +++ b/src/dawn/native/Surface.h @@ -56,7 +56,7 @@ namespace dawn::native { WindowsHWND, WindowsCoreWindow, WindowsSwapChainPanel, - Xlib + XlibWindow, }; Type GetType() const; InstanceBase* GetInstance(); diff --git a/src/dawn/native/vulkan/SwapChainVk.cpp b/src/dawn/native/vulkan/SwapChainVk.cpp index 45ba575b4a..c09cb0d12e 100644 --- a/src/dawn/native/vulkan/SwapChainVk.cpp +++ b/src/dawn/native/vulkan/SwapChainVk.cpp @@ -159,7 +159,7 @@ namespace dawn::native::vulkan { #endif // defined(DAWN_PLATFORM_ANDROID) #if defined(DAWN_USE_X11) - case Surface::Type::Xlib: { + case Surface::Type::XlibWindow: { if (info.HasExt(InstanceExt::XlibSurface)) { VkXlibSurfaceCreateInfoKHR createInfo; createInfo.sType = VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR;