diff options
Diffstat (limited to 'src/plugins/platforms/xcb')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbnativeinterface.cpp | 16 | ||||
-rw-r--r-- | src/plugins/platforms/xcb/qxcbnativeinterface.h | 2 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp index b381fac5bb..5673d41811 100644 --- a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp +++ b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp @@ -79,6 +79,7 @@ static int resourceType(const QByteArray &key) QByteArrayLiteral("display"), QByteArrayLiteral("egldisplay"), QByteArrayLiteral("connection"), QByteArrayLiteral("screen"), QByteArrayLiteral("eglcontext"), + QByteArrayLiteral("eglconfig"), QByteArrayLiteral("glxconfig"), QByteArrayLiteral("glxcontext"), QByteArrayLiteral("apptime"), QByteArrayLiteral("appusertime"), QByteArrayLiteral("hintstyle"), @@ -241,6 +242,9 @@ void *QXcbNativeInterface::nativeResourceForContext(const QByteArray &resourceSt case EglContext: result = eglContextForContext(context); break; + case EglConfig: + result = eglConfigForContext(context); + break; case GLXConfig: result = glxConfigForContext(context); break; @@ -462,6 +466,18 @@ void * QXcbNativeInterface::eglContextForContext(QOpenGLContext *context) #endif } +void * QXcbNativeInterface::eglConfigForContext(QOpenGLContext *context) +{ + Q_ASSERT(context); +#if defined(XCB_USE_EGL) + QEGLPlatformContext *eglPlatformContext = static_cast<QEGLPlatformContext *>(context->handle()); + return eglPlatformContext->eglConfig(); +#else + Q_UNUSED(context); + return 0; +#endif +} + void *QXcbNativeInterface::glxContextForContext(QOpenGLContext *context) { Q_ASSERT(context); diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.h b/src/plugins/platforms/xcb/qxcbnativeinterface.h index 01b66a767d..c63cdf0254 100644 --- a/src/plugins/platforms/xcb/qxcbnativeinterface.h +++ b/src/plugins/platforms/xcb/qxcbnativeinterface.h @@ -63,6 +63,7 @@ public: Connection, Screen, EglContext, + EglConfig, GLXConfig, GLXContext, AppTime, @@ -104,6 +105,7 @@ public: static void setAppTime(QScreen *screen, xcb_timestamp_t time); static void setAppUserTime(QScreen *screen, xcb_timestamp_t time); static void *eglContextForContext(QOpenGLContext *context); + static void *eglConfigForContext(QOpenGLContext *context); static void *glxContextForContext(QOpenGLContext *context); static void *glxConfigForContext(QOpenGLContext *context); |