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;