Make use of VkSemaphores thread safe assuming use of the same VkQueue.

This allows us to re-enable support for multiple GrContexts in
GrBackendTextureImageGenerator.

Bug: skia:
Change-Id: Ifd6ac1ad81cdfbd1fd986467d8beb359399d6588
Reviewed-on: https://skia-review.googlesource.com/98340
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h
index e8e0ab9..2f12073 100644
--- a/src/gpu/GrGpu.h
+++ b/src/gpu/GrGpu.h
@@ -377,11 +377,11 @@
     virtual void deleteFence(GrFence) const = 0;
 
     virtual sk_sp<GrSemaphore> SK_WARN_UNUSED_RESULT makeSemaphore(bool isOwned = true) = 0;
-    sk_sp<GrSemaphore> wrapBackendSemaphore(const GrBackendSemaphore& semaphore,
-                                            GrResourceProvider::SemaphoreWrapType wrapType,
-                                            GrWrapOwnership ownership);
-    void insertSemaphore(sk_sp<GrSemaphore> semaphore, bool flush = false);
-    void waitSemaphore(sk_sp<GrSemaphore> semaphore);
+    virtual sk_sp<GrSemaphore> wrapBackendSemaphore(const GrBackendSemaphore& semaphore,
+                                                    GrResourceProvider::SemaphoreWrapType wrapType,
+                                                    GrWrapOwnership ownership) = 0;
+    virtual void insertSemaphore(sk_sp<GrSemaphore> semaphore, bool flush = false) = 0;
+    virtual void waitSemaphore(sk_sp<GrSemaphore> semaphore) = 0;
 
     /**
      *  Put this texture in a safe and known state for use across multiple GrContexts. Depending on
@@ -606,11 +606,6 @@
 
     virtual void onFinishFlush(bool insertedSemaphores) = 0;
 
-    virtual void onInsertSemaphore(sk_sp<GrSemaphore> semaphore, bool flush = false) = 0;
-    virtual void onWaitSemaphore(sk_sp<GrSemaphore> semaphore) = 0;
-    virtual sk_sp<GrSemaphore> onWrapBackendSemaphore(const GrBackendSemaphore& semaphore,
-                                                      GrWrapOwnership ownership) = 0;
-
     virtual void onDumpJSON(SkJSONWriter*) const {}
 
     void resetContext() {