Fix a leak of the resource EGL context on Android (flutter/engine#26789)

This commit is contained in:
Jason Simmons
2021-06-17 08:59:01 -07:00
committed by GitHub
parent 892b1fda33
commit f3254b3a60

View File

@@ -92,7 +92,9 @@ bool AndroidSurfaceGL::ResourceContextMakeCurrent() {
bool AndroidSurfaceGL::ResourceContextClearCurrent() {
FML_DCHECK(IsValid());
return GLContextPtr()->ClearCurrent();
EGLBoolean result = eglMakeCurrent(eglGetCurrentDisplay(), EGL_NO_SURFACE,
EGL_NO_SURFACE, EGL_NO_CONTEXT);
return result == EGL_TRUE;
}
bool AndroidSurfaceGL::SetNativeWindow(