未验证 提交 46b77937 编写于 作者: J Jason Simmons 提交者: GitHub

Clear the EGL context only if our context is currently active (#5895)

Fixes https://github.com/flutter/flutter/issues/19566
上级 2f4a0220
......@@ -222,6 +222,9 @@ bool AndroidContextGL::MakeCurrent() {
}
bool AndroidContextGL::ClearCurrent() {
if (eglGetCurrentContext() != context_) {
return true;
}
if (eglMakeCurrent(environment_->Display(), EGL_NO_SURFACE, EGL_NO_SURFACE,
EGL_NO_CONTEXT) != EGL_TRUE) {
FML_LOG(ERROR) << "Could not clear the current context";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册