From 9479c0d6b46ff74df7997906f32b7035d2d17de2 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Wed, 23 Sep 2020 02:03:45 +0200 Subject: [PATCH] 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. --- plugins/platforms/drm/egl_gbm_backend.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/plugins/platforms/drm/egl_gbm_backend.cpp b/plugins/platforms/drm/egl_gbm_backend.cpp index 68c59af91b..311b08fa25 100644 --- a/plugins/platforms/drm/egl_gbm_backend.cpp +++ b/plugins/platforms/drm/egl_gbm_backend.cpp @@ -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;