Do not call randomly eglGetError() after eglMakeCurrent
If it failed, it will return accordingly, and then we get to call eglGetError, only when it fails.
This commit is contained in:
parent
13dcb46888
commit
9479c0d6b4
1 changed files with 1 additions and 6 deletions
|
@ -343,12 +343,7 @@ bool EglGbmBackend::makeContextCurrent(const Output &output) const
|
|||
return false;
|
||||
}
|
||||
if (eglMakeCurrent(eglDisplay(), surface, surface, context()) == EGL_FALSE) {
|
||||
qCCritical(KWIN_DRM) << "Make Context Current failed";
|
||||
return false;
|
||||
}
|
||||
EGLint error = eglGetError();
|
||||
if (error != EGL_SUCCESS) {
|
||||
qCWarning(KWIN_DRM) << "Error occurred while creating context " << error;
|
||||
qCCritical(KWIN_DRM) << "Make Context Current failed" << eglGetError();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue