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/GrContext.cpp b/src/gpu/GrContext.cpp
index a2ca3d1..2f4a674 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -239,26 +239,14 @@
////////////////////////////////////////////////////////////////////////////////
-void GrContext::flush() {
- ASSERT_SINGLE_OWNER
- RETURN_IF_ABANDONED
-
- this->drawingManager()->flush(nullptr, SkSurface::BackendSurfaceAccess::kNoAccess,
- kNone_GrFlushFlags, 0, nullptr, nullptr, nullptr);
-}
-
-GrSemaphoresSubmitted GrContext::flush(GrFlushFlags flags, int numSemaphores,
- GrBackendSemaphore signalSemaphores[],
- GrGpuFinishedProc finishedProc,
- GrGpuFinishedContext finishedContext) {
+GrSemaphoresSubmitted GrContext::flush(const GrFlushInfo& info) {
ASSERT_SINGLE_OWNER
if (this->abandoned()) {
return GrSemaphoresSubmitted::kNo;
}
return this->drawingManager()->flush(nullptr, SkSurface::BackendSurfaceAccess::kNoAccess,
- flags, numSemaphores, signalSemaphores, finishedProc,
- finishedContext);
+ info);
}
////////////////////////////////////////////////////////////////////////////////