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(); |
+} |