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

Unified Diff: include/gpu/GrContextFactory.h

Issue 422323002: Some fixes around GrContext::abandonContext: (Closed) Base URL: https://skia.googlesource.com/skia.git@abandon
Patch Set: Address comments Created 6 years, 5 months 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 | include/gpu/GrTexture.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrContextFactory.h
diff --git a/include/gpu/GrContextFactory.h b/include/gpu/GrContextFactory.h
index 01e0239b1a16d966587994263c1f4290bf246e94..e73eb784a9af7859dd6ce5776892098bb8a31c26 100644
--- a/include/gpu/GrContextFactory.h
+++ b/include/gpu/GrContextFactory.h
@@ -107,7 +107,10 @@ public:
void abandonContexts() {
for (int i = 0; i < fContexts.count(); ++i) {
- SkSafeSetNull(fContexts[i].fGLContext);
+ if (NULL != fContexts[i].fGLContext) {
+ fContexts[i].fGLContext->testAbandon();
+ SkSafeSetNull(fContexts[i].fGLContext);
+ }
fContexts[i].fGrContext->abandonContext();
}
}
« no previous file with comments | « no previous file | include/gpu/GrTexture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698