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

Unified Diff: src/gpu/GrContextFactory.cpp

Issue 1733323002: Clean up EGL thread state at thread exit in nanobench and DM (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix main thread usage also Created 4 years, 10 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 | « src/gpu/GrContextFactory.h ('k') | src/gpu/gl/angle/SkANGLEGLContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrContextFactory.cpp
diff --git a/src/gpu/GrContextFactory.cpp b/src/gpu/GrContextFactory.cpp
index b7e48254c881af6835b8c6e195b3a8c2ee1a69a7..236defdf043ac76e72983e7f55e17171f969a395 100755
--- a/src/gpu/GrContextFactory.cpp
+++ b/src/gpu/GrContextFactory.cpp
@@ -149,3 +149,18 @@ GrContextFactory::ContextInfo GrContextFactory::getContextInfo(GLContextType typ
context.fOptions = options;
return ContextInfo(context.fGrContext, context.fGLContext);
}
+
+void GrContextFactory::ReleaseGpuAPIsInThread() {
+#if SK_ANGLE
+ SkANGLEGLContext::ReleaseGpuAPIsInThread();
+#endif
+#if SK_COMMAND_BUFFER
+ SkCommandBufferGLContext::ReleaseGpuAPIsInThread();
+#endif
+#if SK_MESA
+ SkMesaGLContext::ReleaseGpuAPIsInThread();
+#endif
+ // Call platform release the last, since the emulated APIs like command buffer might use the
+ // real APIs in this thread, too.
+ SkReleasePlatformGLAPIsInThread();
+}
« no previous file with comments | « src/gpu/GrContextFactory.h ('k') | src/gpu/gl/angle/SkANGLEGLContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698