Add callback to flush for knowing when gpu is finished work.
Bug: skia:8802
Change-Id: I093c2a4e879b635b169a849d9af3e9f7a3d84a88
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/207870
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 075ac00..a2ca3d1 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -244,18 +244,21 @@
RETURN_IF_ABANDONED
this->drawingManager()->flush(nullptr, SkSurface::BackendSurfaceAccess::kNoAccess,
- kNone_GrFlushFlags, 0, nullptr);
+ kNone_GrFlushFlags, 0, nullptr, nullptr, nullptr);
}
GrSemaphoresSubmitted GrContext::flush(GrFlushFlags flags, int numSemaphores,
- GrBackendSemaphore signalSemaphores[]) {
+ GrBackendSemaphore signalSemaphores[],
+ GrGpuFinishedProc finishedProc,
+ GrGpuFinishedContext finishedContext) {
ASSERT_SINGLE_OWNER
if (this->abandoned()) {
return GrSemaphoresSubmitted::kNo;
}
return this->drawingManager()->flush(nullptr, SkSurface::BackendSurfaceAccess::kNoAccess,
- flags, numSemaphores, signalSemaphores);
+ flags, numSemaphores, signalSemaphores, finishedProc,
+ finishedContext);
}
////////////////////////////////////////////////////////////////////////////////