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

Side by Side Diff: tools/viewer/sk_app/win/VulkanWindowContext_win.cpp

Issue 1999213002: Add Xlib support to viewer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove viewer hack Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « tools/viewer/sk_app/unix/main_unix.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2016 Google Inc. 3 * Copyright 2016 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "../VulkanWindowContext.h" 9 #include "../VulkanWindowContext.h"
10 #include "Window_win.h" 10 #include "Window_win.h"
(...skipping 29 matching lines...) Expand all
40 VkResult res = createWin32SurfaceKHR(instance, &surfaceCreateInfo, nullptr, &surface); 40 VkResult res = createWin32SurfaceKHR(instance, &surfaceCreateInfo, nullptr, &surface);
41 if (VK_SUCCESS != res) { 41 if (VK_SUCCESS != res) {
42 return VK_NULL_HANDLE; 42 return VK_NULL_HANDLE;
43 } 43 }
44 44
45 return surface; 45 return surface;
46 } 46 }
47 47
48 // Platform dependant call 48 // Platform dependant call
49 bool VulkanWindowContext::canPresent(VkInstance instance, VkPhysicalDevice physD ev, 49 bool VulkanWindowContext::canPresent(VkInstance instance, VkPhysicalDevice physD ev,
50 uint32_t queueFamilyIndex) { 50 uint32_t queueFamilyIndex, void*) {
51 static PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR 51 static PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR
52 getPhysicalDeviceWin32PresentationSu pportKHR = nullptr; 52 getPhysicalDeviceWin32PresentationSu pportKHR = nullptr;
53 if (!getPhysicalDeviceWin32PresentationSupportKHR) { 53 if (!getPhysicalDeviceWin32PresentationSupportKHR) {
54 getPhysicalDeviceWin32PresentationSupportKHR = 54 getPhysicalDeviceWin32PresentationSupportKHR =
55 (PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR) vkGetInstancePr ocAddr(instance, 55 (PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR) vkGetInstancePr ocAddr(instance,
56 "vkGetPhysicalDeviceWin32Presen tationSupportKHR"); 56 "vkGetPhysicalDeviceWin32Presen tationSupportKHR");
57 } 57 }
58 58
59 VkBool32 check = getPhysicalDeviceWin32PresentationSupportKHR(physDev, queue FamilyIndex); 59 VkBool32 check = getPhysicalDeviceWin32PresentationSupportKHR(physDev, queue FamilyIndex);
60 return (VK_FALSE != check); 60 return (VK_FALSE != check);
61 } 61 }
62 62
63 } // namespace sk_app 63 } // namespace sk_app
OLDNEW
« no previous file with comments | « tools/viewer/sk_app/unix/main_unix.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698