Add struct to wrap all the gpu flush options.

Bug: skia:8802
Change-Id: Ia92807034a8f54067cead59e29c233f91e11f175
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/208674
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/mtl/GrMtlGpu.h b/src/gpu/mtl/GrMtlGpu.h
index e806996..ba738ea 100644
--- a/src/gpu/mtl/GrMtlGpu.h
+++ b/src/gpu/mtl/GrMtlGpu.h
@@ -179,20 +179,18 @@
     void onResolveRenderTarget(GrRenderTarget* target) override { return; }
 
     void onFinishFlush(GrSurfaceProxy*, SkSurface::BackendSurfaceAccess access,
-                       GrFlushFlags flags, bool insertedSemaphores,
-                       GrGpuFinishedProc finishedProc,
-                       GrGpuFinishedContext finishedContext) override {
-        if (flags & kSyncCpu_GrFlushFlag) {
+                       const GrFlushInfo& info) override {
+        if (info.fFlags & kSyncCpu_GrFlushFlag) {
             this->submitCommandBuffer(kForce_SyncQueue);
-            if (finishedProc) {
-                finishedProc(finishedContext);
+            if (info.fFinishedProc) {
+                info.fFinishedProc(info.fFinishedContext);
             }
         } else {
             this->submitCommandBuffer(kSkip_SyncQueue);
             // TODO: support finishedProc to actually be called when the GPU is done with the work
             // and not immediately.
-            if (finishedProc) {
-                finishedProc(finishedContext);
+            if (info.fFinishedProc) {
+                info.fFinishedProc(info.fFinishedContext);
             }
         }
     }