Index: tools/viewer/sk_app/win/VulkanWindowContext_win.cpp |
diff --git a/tools/viewer/win/VulkanTestContext_win.cpp b/tools/viewer/sk_app/win/VulkanWindowContext_win.cpp |
similarity index 62% |
rename from tools/viewer/win/VulkanTestContext_win.cpp |
rename to tools/viewer/sk_app/win/VulkanWindowContext_win.cpp |
index 37ef6674292e45a9d29fda38a282f7f34e54db0a..05f3bddd319f8d38305e167e708ee94b18325c19 100644 |
--- a/tools/viewer/win/VulkanTestContext_win.cpp |
+++ b/tools/viewer/sk_app/win/VulkanWindowContext_win.cpp |
@@ -6,24 +6,26 @@ |
* found in the LICENSE file. |
*/ |
-#include "VulkanTestContext_win.h" |
+#include "VulkanWindowContext_win.h" |
#include "vk/GrVkInterface.h" |
#include "vk/GrVkUtil.h" |
+namespace sk_app { |
+ |
// Platform dependant call |
-VkSurfaceKHR VulkanTestContext::createVkSurface(VkInstance instance, void* platformData) { |
+VkSurfaceKHR VulkanWindowContext::createVkSurface(VkInstance instance, void* platformData) { |
static PFN_vkCreateWin32SurfaceKHR createWin32SurfaceKHR = nullptr; |
if (!createWin32SurfaceKHR) { |
- createWin32SurfaceKHR = (PFN_vkCreateWin32SurfaceKHR)vkGetInstanceProcAddr(instance, |
- "vkCreateWin32SurfaceKHR"); |
+ createWin32SurfaceKHR = (PFN_vkCreateWin32SurfaceKHR) vkGetInstanceProcAddr(instance, |
+ "vkCreateWin32SurfaceKHR"); |
} |
if (!platformData) { |
return VK_NULL_HANDLE; |
} |
- ContextPlatformData_win* winPlatformData = |
- reinterpret_cast<ContextPlatformData_win*>(platformData); |
+ ContextPlatformData_win* winPlatformData = |
+ reinterpret_cast<ContextPlatformData_win*>(platformData); |
VkSurfaceKHR surface; |
VkWin32SurfaceCreateInfoKHR surfaceCreateInfo; |
@@ -43,16 +45,18 @@ VkSurfaceKHR VulkanTestContext::createVkSurface(VkInstance instance, void* platf |
} |
// Platform dependant call |
-bool VulkanTestContext::canPresent(VkInstance instance, VkPhysicalDevice physDev, |
+bool VulkanWindowContext::canPresent(VkInstance instance, VkPhysicalDevice physDev, |
uint32_t queueFamilyIndex) { |
- static PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR |
- getPhysicalDeviceWin32PresentationSupportKHR = nullptr; |
+ static PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR |
+ getPhysicalDeviceWin32PresentationSupportKHR = nullptr; |
if (!getPhysicalDeviceWin32PresentationSupportKHR) { |
- getPhysicalDeviceWin32PresentationSupportKHR = |
+ getPhysicalDeviceWin32PresentationSupportKHR = |
(PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR) vkGetInstanceProcAddr(instance, |
- "vkGetPhysicalDeviceWin32PresentationSupportKHR"); |
+ "vkGetPhysicalDeviceWin32PresentationSupportKHR"); |
} |
VkBool32 check = getPhysicalDeviceWin32PresentationSupportKHR(physDev, queueFamilyIndex); |
return (VK_FALSE != check); |
} |
+ |
+} // namespace sk_app |