Check for EGL_KHR_platform_x11 in addition to EGL_EXT_platform_x11

Summary:
Some platforms (like Mali) only report the newer EGL_KHR_platform_x11
on X11.

Reviewers: kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D2933
remotes/origin/Plasma/5.8
Rohan Garg 10 years ago
parent 48db671684
commit 6199631604
No known key found for this signature in database
GPG Key ID: A704BD4EF2672094
  1. 6
      plugins/platforms/x11/common/eglonxbackend.cpp

@ -181,8 +181,10 @@ bool EglOnXBackend::initRenderingContext()
setHavePlatformBase(havePlatformBase);
if (havePlatformBase) {
// Make sure that the X11 platform is supported
if (!hasClientExtension(QByteArrayLiteral("EGL_EXT_platform_x11"))) {
qCWarning(KWIN_CORE) << "EGL_EXT_platform_base is supported, but EGL_EXT_platform_x11 is not. Cannot create EGLDisplay on X11";
if (!hasClientExtension(QByteArrayLiteral("EGL_EXT_platform_x11")) &&
!hasClientExtension(QByteArrayLiteral("EGL_KHR_platform_x11")) {
qCWarning(KWIN_CORE) << "EGL_EXT_platform_base is supported, but neither EGL_EXT_platform_x11 nor EGL_KHR_platform_x11 is supported."
<< "Cannot create EGLDisplay on X11";
return false;
}

Loading…
Cancel
Save