Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(213)

Unified Diff: src/gpu/GrContext.cpp

Issue 1441533003: Update testing frameworks/tests for MDB (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix ref counting bug Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/gpu/GrDrawContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « no previous file | src/gpu/GrDrawContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698