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

Unified Diff: tools/vulkan/win/VulkanTestContext_win.cpp

Issue 1945103003: Rename VulkanViewer to Viewer, take 2. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix android path 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/vulkan/win/VulkanTestContext_win.h ('k') | tools/vulkan/win/Window_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/vulkan/win/VulkanTestContext_win.cpp
diff --git a/tools/vulkan/win/VulkanTestContext_win.cpp b/tools/vulkan/win/VulkanTestContext_win.cpp
deleted file mode 100644
index 37ef6674292e45a9d29fda38a282f7f34e54db0a..0000000000000000000000000000000000000000
--- a/tools/vulkan/win/VulkanTestContext_win.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-
-/*
- * Copyright 2016 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "VulkanTestContext_win.h"
-
-#include "vk/GrVkInterface.h"
-#include "vk/GrVkUtil.h"
-
-// Platform dependant call
-VkSurfaceKHR VulkanTestContext::createVkSurface(VkInstance instance, void* platformData) {
- static PFN_vkCreateWin32SurfaceKHR createWin32SurfaceKHR = nullptr;
- if (!createWin32SurfaceKHR) {
- createWin32SurfaceKHR = (PFN_vkCreateWin32SurfaceKHR)vkGetInstanceProcAddr(instance,
- "vkCreateWin32SurfaceKHR");
- }
-
- if (!platformData) {
- return VK_NULL_HANDLE;
- }
- ContextPlatformData_win* winPlatformData =
- reinterpret_cast<ContextPlatformData_win*>(platformData);
- VkSurfaceKHR surface;
-
- VkWin32SurfaceCreateInfoKHR surfaceCreateInfo;
- memset(&surfaceCreateInfo, 0, sizeof(VkWin32SurfaceCreateInfoKHR));
- surfaceCreateInfo.sType = VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR;
- surfaceCreateInfo.pNext = nullptr;
- surfaceCreateInfo.flags = 0;
- surfaceCreateInfo.hinstance = winPlatformData->fHInstance;
- surfaceCreateInfo.hwnd = winPlatformData->fHWnd;
-
- VkResult res = createWin32SurfaceKHR(instance, &surfaceCreateInfo, nullptr, &surface);
- if (VK_SUCCESS != res) {
- return VK_NULL_HANDLE;
- }
-
- return surface;
-}
-
-// Platform dependant call
-bool VulkanTestContext::canPresent(VkInstance instance, VkPhysicalDevice physDev,
- uint32_t queueFamilyIndex) {
- static PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR
- getPhysicalDeviceWin32PresentationSupportKHR = nullptr;
- if (!getPhysicalDeviceWin32PresentationSupportKHR) {
- getPhysicalDeviceWin32PresentationSupportKHR =
- (PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR) vkGetInstanceProcAddr(instance,
- "vkGetPhysicalDeviceWin32PresentationSupportKHR");
- }
-
- VkBool32 check = getPhysicalDeviceWin32PresentationSupportKHR(physDev, queueFamilyIndex);
- return (VK_FALSE != check);
-}
« no previous file with comments | « tools/vulkan/win/VulkanTestContext_win.h ('k') | tools/vulkan/win/Window_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698