Totally block trying to flush a ddl drawmgr

This should never be possible.

Bug: skia:10877
Change-Id: I476ece42182b2296da528a2b3a3a2587c5bfedea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332719
Auto-Submit: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This commit is contained in:
Adlai Holler 2020-11-06 12:34:56 -05:00 committed by Skia Commit-Bot
parent b8123cc877
commit aee25fd65a

View File

@ -208,15 +208,7 @@ bool GrDrawingManager::flush(
}
auto direct = fContext->asDirectContext();
if (!direct) {
if (info.fSubmittedProc) {
info.fSubmittedProc(info.fSubmittedContext, false);
}
if (info.fFinishedProc) {
info.fFinishedProc(info.fFinishedContext);
}
return false; // Can't flush while DDL recording
}
SkASSERT(direct);
direct->priv().clientMappedBufferManager()->process();
GrGpu* gpu = direct->priv().getGpu();
@ -534,16 +526,7 @@ GrSemaphoresSubmitted GrDrawingManager::flushSurfaces(
SkASSERT(!numProxies || proxies);
auto direct = fContext->asDirectContext();
if (!direct) {
if (info.fSubmittedProc) {
info.fSubmittedProc(info.fSubmittedContext, false);
}
if (info.fFinishedProc) {
info.fFinishedProc(info.fFinishedContext);
}
return GrSemaphoresSubmitted::kNo; // Can't flush while DDL recording
}
SkASSERT(direct);
GrGpu* gpu = direct->priv().getGpu();
// We have a non abandoned and direct GrContext. It must have a GrGpu.
SkASSERT(gpu);