Index: src/gpu/GrContext.cpp |
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp |
index bd4ca40a34b05139fa2ea39565c447bc07255456..348cdbaacac3bb7a631d5447293cde668fcdfbb2 100644 |
--- a/src/gpu/GrContext.cpp |
+++ b/src/gpu/GrContext.cpp |
@@ -118,14 +118,17 @@ GrContext::~GrContext() { |
void GrContext::abandonContext() { |
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(); |
+ |
// abandon first to so destructors |
// don't try to free the resources in the API. |
fResourceCache->abandonAll(); |
fGpu->contextAbandoned(); |
- fDrawingManager->abandon(); |
- |
fBatchFontCache->freeAll(); |
fLayerCache->freeAll(); |
fTextBlobCache->freeAll(); |