diff options
author | Samuel Rødal <samuel.rodal@digia.com> | 2012-10-08 12:53:56 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-10-19 20:24:11 +0200 |
commit | 39eaff6773fc4f05fc95473b769b3a2f0301e12b (patch) | |
tree | bc2943a5000eab5c3a8e3d2a0b39f654ddbd7059 /src/plugins/platforms/xcb/qxcbnativeinterface.cpp | |
parent | 9b2e4cd5a8cac007aa702ce5f822e78e54707a07 (diff) |
Remove DRI2/OpenGL code paths from xcb plugin.
These were used to test QtWayland, but there are other options available
for that now. The DRI2 code hasn't been maintained and doesn't even
compile at the moment, so let's just remove it to de-clutter the source.
Change-Id: I7db0f4db82348497b9f4d6c2dcf2e13f3ab14a76
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbnativeinterface.cpp')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbnativeinterface.cpp | 42 |
1 files changed, 1 insertions, 41 deletions
diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp index 335866dc9d..40f39843e5 100644 --- a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp +++ b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp @@ -53,8 +53,6 @@ #if defined(XCB_USE_EGL) #include "QtPlatformSupport/private/qeglplatformcontext_p.h" -#elif defined (XCB_USE_DRI2) -#include "qdri2context.h" #endif QT_BEGIN_NAMESPACE @@ -69,7 +67,6 @@ public: insert("egldisplay",QXcbNativeInterface::EglDisplay); insert("connection",QXcbNativeInterface::Connection); insert("screen",QXcbNativeInterface::Screen); - insert("graphicsdevice",QXcbNativeInterface::GraphicsDevice); insert("eglcontext",QXcbNativeInterface::EglContext); } }; @@ -122,9 +119,6 @@ void *QXcbNativeInterface::nativeResourceForWindow(const QByteArray &resourceStr case Screen: result = qPlatformScreenForWindow(window); break; - case GraphicsDevice: - result = graphicsDeviceForWindow(window); - break; default: break; } @@ -165,7 +159,7 @@ void *QXcbNativeInterface::displayForWindow(QWindow *window) void *QXcbNativeInterface::eglDisplayForWindow(QWindow *window) { -#if defined(XCB_USE_DRI2) || defined(XCB_USE_EGL) +#if defined(XCB_USE_EGL) QXcbScreen *screen = qPlatformScreenForWindow(window); return screen->connection()->egl_display(); #else @@ -186,19 +180,6 @@ void *QXcbNativeInterface::screenForWindow(QWindow *window) return screen->screen(); } -void *QXcbNativeInterface::graphicsDeviceForWindow(QWindow *window) -{ -#if defined(XCB_USE_DRI2) - QXcbScreen *screen = qPlatformScreenForWindow(window); - QByteArray deviceName = screen->connection()->dri2DeviceName(); - return deviceName.data(); -#else - Q_UNUSED(window); - return 0; -#endif - -} - void * QXcbNativeInterface::eglContextForContext(QOpenGLContext *context) { Q_ASSERT(context); @@ -206,27 +187,6 @@ void * QXcbNativeInterface::eglContextForContext(QOpenGLContext *context) QEGLPlatformContext *eglPlatformContext = static_cast<QEGLPlatformContext *>(context->handle()); return eglPlatformContext->eglContext(); #endif -#if 0 - Q_ASSERT(window); - QPlatformOpenGLContext *platformContext = window->glContext()->handle(); - if (!platformContext) { - qDebug() << "QWindow" << window << "does not have a glContext" - << "cannot return EGLContext"; - return 0; - } -#if defined(XCB_USE_EGL) - QEGLPlatformContext *eglPlatformContext = static_cast<QEGLPlatformContext *>(platformContext); - return eglPlatformContext->eglContext(); -#elif defined (XCB_USE_DRI2) - QDri2Context *dri2Context = static_cast<QDri2Context *>(platformContext); - return dri2Context->eglContext(); -#else - return 0; -#endif -#else - Q_UNUSED(context) - return 0; -#endif } QT_END_NAMESPACE |