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

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: 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') | include/gpu/gl/SkGLContextHelper.h » ('J')
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..66b6de2f1573bc05f6b3bf783bbd51971a840bf5 100644
--- a/include/gpu/GrContextFactory.h
+++ b/include/gpu/GrContextFactory.h
@@ -107,7 +107,11 @@ public:
void abandonContexts() {
for (int i = 0; i < fContexts.count(); ++i) {
- SkSafeSetNull(fContexts[i].fGLContext);
+ if (fContexts[i].fGLContext) {
+ fContexts[i].fGLContext->testAbandon();
+ fContexts[i].fGLContext->unref();
+ fContexts[i].fGLContext = NULL;
+ }
fContexts[i].fGrContext->abandonContext();
}
}
« no previous file with comments | « no previous file | include/gpu/GrTexture.h » ('j') | include/gpu/gl/SkGLContextHelper.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698