Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Unified Diff: tools/viewer/sk_app/win/VulkanWindowContext_win.cpp

Issue 1944413005: More refactoring for Viewer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix up Android Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/viewer/sk_app/win/VulkanWindowContext_win.h ('k') | tools/viewer/sk_app/win/Window_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « tools/viewer/sk_app/win/VulkanWindowContext_win.h ('k') | tools/viewer/sk_app/win/Window_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698