| Index: src/gpu/GrContext.cpp
|
| diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
|
| index 1f6934d441523d792bf60970bbff7d8cf36645c0..1d6bb32142ce09b40c6ae401ced9ebfbdbffe561 100644
|
| --- a/src/gpu/GrContext.cpp
|
| +++ b/src/gpu/GrContext.cpp
|
| @@ -148,7 +148,26 @@ void GrContext::abandonContext() {
|
| // don't try to free the resources in the API.
|
| fResourceCache->abandonAll();
|
|
|
| - fGpu->contextAbandoned();
|
| + fGpu->disconnect(GrGpu::DisconnectType::kAbandon);
|
| +
|
| + fBatchFontCache->freeAll();
|
| + fLayerCache->freeAll();
|
| + fTextBlobCache->freeAll();
|
| +}
|
| +
|
| +void GrContext::releaseResourcesAndAbandonContext() {
|
| + ASSERT_SINGLE_OWNER
|
| +
|
| + fResourceProvider->abandon();
|
| +
|
| + // Need to abandon the drawing manager first so all the render targets
|
| + // will be released/forgotten before they too are abandoned.
|
| + fDrawingManager->abandon();
|
| +
|
| + // Release all resources in the backend 3D API.
|
| + fResourceCache->releaseAll();
|
| +
|
| + fGpu->disconnect(GrGpu::DisconnectType::kCleanup);
|
|
|
| fBatchFontCache->freeAll();
|
| fLayerCache->freeAll();
|
|
|