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

Unified Diff: tools/viewer/sk_app/android/VulkanWindowContext_android.cpp

Issue 2239493002: Fix crash in viewer on certain android devices (Closed) Base URL: https://skia.googlesource.com/skia.git@4444
Patch Set: fix branch Created 4 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698