Add option to GrContext::flush for GrPrepareForExternalIORequests.

This will allow clients to specify a set of SkImages and SkSurfaces that they
want transitioned to a state which they can use for their own external IO.
Specifically for Vulkan this will move the surface and images back to the queues
in which they were originally wrapped or created with.

Bug: skia:8802
Change-Id: I6a76c4c4a333a8e752632d349899f5fd9921329d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210460
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 19d1f6e..e2374e7 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -258,14 +258,15 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 
-GrSemaphoresSubmitted GrContext::flush(const GrFlushInfo& info) {
+GrSemaphoresSubmitted GrContext::flush(const GrFlushInfo& info,
+                                       const GrPrepareForExternalIORequests& externalRequests) {
     ASSERT_SINGLE_OWNER
     if (this->abandoned()) {
         return GrSemaphoresSubmitted::kNo;
     }
 
     return this->drawingManager()->flush(nullptr, 0, SkSurface::BackendSurfaceAccess::kNoAccess,
-                                         info);
+                                         info, externalRequests);
 }
 
 ////////////////////////////////////////////////////////////////////////////////