From aee25fd65a91d2d17e3c039cc73337254558281c Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Fri, 6 Nov 2020 12:34:56 -0500 Subject: [PATCH] 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 Commit-Queue: Robert Phillips Reviewed-by: Robert Phillips --- src/gpu/GrDrawingManager.cpp | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/src/gpu/GrDrawingManager.cpp b/src/gpu/GrDrawingManager.cpp index a55ea63287..0c181c2b8f 100644 --- a/src/gpu/GrDrawingManager.cpp +++ b/src/gpu/GrDrawingManager.cpp @@ -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);