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

Unified Diff: gpu/vulkan/vulkan_surface.cc

Issue 1925603002: Introduce Android WSI extension for Vulkan. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « gpu/vulkan/vulkan_platform.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/vulkan/vulkan_surface.cc
diff --git a/gpu/vulkan/vulkan_surface.cc b/gpu/vulkan/vulkan_surface.cc
index bfa70d092f5c7e067e7b2fedb73006c4be909232..63e01c36c32c42dfbb2c86453760d6214846d9b5 100644
--- a/gpu/vulkan/vulkan_surface.cc
+++ b/gpu/vulkan/vulkan_surface.cc
@@ -54,6 +54,17 @@ class VulkanWSISurface : public VulkanSurface {
DLOG(ERROR) << "vkCreateXlibSurfaceKHR() failed: " << result;
return false;
}
+#elif defined(VK_USE_PLATFORM_ANDROID_KHR)
+ VkAndroidSurfaceCreateInfoKHR surface_create_info = {};
+ surface_create_info.sType =
+ VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR;
+ surface_create_info.window = window_;
+ result = vkCreateAndroidSurfaceKHR(
+ GetVulkanInstance(), &surface_create_info, nullptr, &surface_);
+ if (VK_SUCCESS != result) {
+ DLOG(ERROR) << "vkCreateAndroidSurfaceKHR() failed: " << result;
+ return false;
+ }
#else
#error Unsupported Vulkan Platform.
#endif
« no previous file with comments | « gpu/vulkan/vulkan_platform.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698