Fix some static intializers in Vulkan code.

Bug: skia:
Change-Id: Ia5160376ff456874459430e51c2f57acdb1a4de1
Reviewed-on: https://skia-review.googlesource.com/137584
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Chris Blume <cblume@chromium.org>
Commit-Queue: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/vk/GrVkSemaphore.h b/src/gpu/vk/GrVkSemaphore.h
index 36d1e6e..8f39e17 100644
--- a/src/gpu/vk/GrVkSemaphore.h
+++ b/src/gpu/vk/GrVkSemaphore.h
@@ -44,8 +44,8 @@
 
         VkSemaphore semaphore() const { return fSemaphore; }
 
-        static void AcquireMutex() { gMutex.acquire(); }
-        static void ReleaseMutex() { gMutex.release(); }
+        static void AcquireMutex() { GetMutex()->acquire(); }
+        static void ReleaseMutex() { GetMutex()->release(); }
 
         bool shouldSignal() const {
             return !fHasBeenSubmittedToQueueForSignal;
@@ -55,11 +55,11 @@
         }
 
         void markAsSignaled() {
-            gMutex.assertHeld();
+            GetMutex()->assertHeld();
             fHasBeenSubmittedToQueueForSignal = true;
         }
         void markAsWaited() {
-            gMutex.assertHeld();
+            GetMutex()->assertHeld();
             fHasBeenSubmittedToQueueForWait = true;
         }
 
@@ -71,7 +71,11 @@
     private:
         void freeGPUData(const GrVkGpu* gpu) const override;
 
-        static SkMutex gMutex;
+        static SkMutex* GetMutex() {
+            static SkMutex kMutex;
+            return &kMutex;
+        }
+
         VkSemaphore fSemaphore;
         bool        fHasBeenSubmittedToQueueForSignal;
         bool        fHasBeenSubmittedToQueueForWait;