Fully add back old GrContext flush api.
I left off the optional finished proc on the previous cl :( Change-Id: I5f540c718bb7e12e7ea74287f1e50e35edd79700 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209417 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Auto-Submit: Greg Daniel <egdaniel@google.com>
This commit is contained in:
parent
e0eeda5756
commit
5816b3d45d
@ -737,7 +737,14 @@ public:
|
||||
*/
|
||||
GrSemaphoresSubmitted flush(BackendSurfaceAccess access, const GrFlushInfo& info);
|
||||
|
||||
/** The below enum and flush call are deprected
|
||||
/** Deprecated
|
||||
*/
|
||||
GrSemaphoresSubmitted flush(BackendSurfaceAccess access, GrFlushFlags flags,
|
||||
int numSemaphores, GrBackendSemaphore signalSemaphores[],
|
||||
GrGpuFinishedProc finishedProc = nullptr,
|
||||
GrGpuFinishedContext finishedContext = nullptr);
|
||||
|
||||
/** The below enum and flush call are deprecated
|
||||
*/
|
||||
enum FlushFlags {
|
||||
kNone_FlushFlags = 0,
|
||||
|
@ -263,11 +263,15 @@ public:
|
||||
* Deprecated.
|
||||
*/
|
||||
GrSemaphoresSubmitted flush(GrFlushFlags flags, int numSemaphores,
|
||||
GrBackendSemaphore signalSemaphores[]) {
|
||||
GrBackendSemaphore signalSemaphores[],
|
||||
GrGpuFinishedProc finishedProc = nullptr,
|
||||
GrGpuFinishedContext finishedContext = nullptr) {
|
||||
GrFlushInfo info;
|
||||
info.fFlags = flags;
|
||||
info.fNumSemaphores = numSemaphores;
|
||||
info.fSignalSemaphores = signalSemaphores;
|
||||
info.fFinishedProc = finishedProc;
|
||||
info.fFinishedContext = finishedContext;
|
||||
return this->flush(info);
|
||||
}
|
||||
|
||||
|
@ -247,6 +247,19 @@ GrSemaphoresSubmitted SkSurface::flush(BackendSurfaceAccess access, const GrFlus
|
||||
return asSB(this)->onFlush(access, flushInfo);
|
||||
}
|
||||
|
||||
GrSemaphoresSubmitted SkSurface::flush(BackendSurfaceAccess access, GrFlushFlags flags,
|
||||
int numSemaphores, GrBackendSemaphore signalSemaphores[],
|
||||
GrGpuFinishedProc finishedProc,
|
||||
GrGpuFinishedContext finishedContext) {
|
||||
GrFlushInfo info;
|
||||
info.fFlags = flags;
|
||||
info.fNumSemaphores = numSemaphores;
|
||||
info.fSignalSemaphores = signalSemaphores;
|
||||
info.fFinishedProc = finishedProc;
|
||||
info.fFinishedContext = finishedContext;
|
||||
return this->flush(access, info);
|
||||
}
|
||||
|
||||
GrSemaphoresSubmitted SkSurface::flush(BackendSurfaceAccess access, FlushFlags flags,
|
||||
int numSemaphores, GrBackendSemaphore signalSemaphores[]) {
|
||||
GrFlushFlags grFlags = flags == kSyncCpu_FlushFlag ? kSyncCpu_GrFlushFlag : kNone_GrFlushFlags;
|
||||
|
Loading…
Reference in New Issue
Block a user