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 |