Index: tools/viewer/sk_app/android/VulkanWindowContext_android.cpp |
diff --git a/tools/viewer/sk_app/android/VulkanWindowContext_android.cpp b/tools/viewer/sk_app/android/VulkanWindowContext_android.cpp |
index 68f2051f3aa636ef9730b335dc372cb7f5c18eb2..b50e152291be5c56e08f5da673e4fa8406d15be9 100644 |
--- a/tools/viewer/sk_app/android/VulkanWindowContext_android.cpp |
+++ b/tools/viewer/sk_app/android/VulkanWindowContext_android.cpp |
@@ -15,11 +15,9 @@ namespace window_context_factory { |
WindowContext* NewVulkanForAndroid(ANativeWindow* window, const DisplayParams& params) { |
auto createVkSurface = [window] (VkInstance instance) -> VkSurfaceKHR { |
- static PFN_vkCreateAndroidSurfaceKHR createAndroidSurfaceKHR = nullptr; |
- if (!createAndroidSurfaceKHR) { |
- createAndroidSurfaceKHR = (PFN_vkCreateAndroidSurfaceKHR)vkGetInstanceProcAddr( |
- instance, "vkCreateAndroidSurfaceKHR"); |
- } |
+ PFN_vkCreateAndroidSurfaceKHR createAndroidSurfaceKHR = |
+ (PFN_vkCreateAndroidSurfaceKHR)vkGetInstanceProcAddr(instance, |
+ "vkCreateAndroidSurfaceKHR"); |
if (!window) { |
return VK_NULL_HANDLE; |