summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylandintegration.cpp
diff options
context:
space:
mode:
authorJorgen Lind <jorgen.lind@digia.com>2013-11-20 16:19:46 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-27 15:32:28 +0100
commit83791e4c0104d8b87ad2f198f9c07407c45603e3 (patch)
tree1e648ce8598c363c06796cd7cb599e1ffd68d875 /src/client/qwaylandintegration.cpp
parent4e6e4783802c0a4483ab59a1bafbc2822eb5b725 (diff)
Move to new hardware structure for the platform plugins
Change-Id: I0d383e4cdd59c4e4eae5506c814f0c80ecbf58ae Reviewed-by: Andy Nichols <andy.nichols@digia.com>
Diffstat (limited to 'src/client/qwaylandintegration.cpp')
-rw-r--r--src/client/qwaylandintegration.cpp32
1 files changed, 12 insertions, 20 deletions
diff --git a/src/client/qwaylandintegration.cpp b/src/client/qwaylandintegration.cpp
index 9c02419b8..af4c4f7d4 100644
--- a/src/client/qwaylandintegration.cpp
+++ b/src/client/qwaylandintegration.cpp
@@ -110,7 +110,7 @@ QWaylandIntegration::QWaylandIntegration()
, mAccessibility(0)
#endif
{
- mDisplay = new QWaylandDisplay();
+ mDisplay = new QWaylandDisplay(this);
mClipboard = new QWaylandClipboard(mDisplay);
mDrag = new QWaylandDrag(mDisplay);
@@ -141,17 +141,9 @@ bool QWaylandIntegration::hasCapability(QPlatformIntegration::Capability cap) co
switch (cap) {
case ThreadedPixmaps: return true;
case OpenGL:
-#ifdef QT_WAYLAND_GL_SUPPORT
- return true;
-#else
- return false;
-#endif
+ return mDisplay->glIntegration();
case ThreadedOpenGL:
-#ifdef QT_WAYLAND_GL_SUPPORT
- return mDisplay->eglIntegration()->supportsThreadedOpenGL();
-#else
- return false;
-#endif
+ return mDisplay->glIntegration() && mDisplay->glIntegration()->supportsThreadedOpenGL();
case BufferQueueingOpenGL:
return true;
case MultipleWindows:
@@ -163,21 +155,16 @@ bool QWaylandIntegration::hasCapability(QPlatformIntegration::Capability cap) co
QPlatformWindow *QWaylandIntegration::createPlatformWindow(QWindow *window) const
{
-#ifdef QT_WAYLAND_GL_SUPPORT
- if (window->surfaceType() == QWindow::OpenGLSurface)
- return mDisplay->eglIntegration()->createEglWindow(window);
-#endif
+ if (window->surfaceType() == QWindow::OpenGLSurface && mDisplay->glIntegration())
+ return mDisplay->glIntegration()->createEglWindow(window);
return new QWaylandShmWindow(window);
}
QPlatformOpenGLContext *QWaylandIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const
{
-#ifdef QT_WAYLAND_GL_SUPPORT
- return mDisplay->eglIntegration()->createPlatformOpenGLContext(context->format(), context->shareHandle());
-#else
- Q_UNUSED(context);
+ if (mDisplay->glIntegration())
+ return mDisplay->glIntegration()->createPlatformOpenGLContext(context->format(), context->shareHandle());
return 0;
-#endif
}
QPlatformBackingStore *QWaylandIntegration::createPlatformBackingStore(QWindow *window) const
@@ -249,4 +236,9 @@ QPlatformTheme *QWaylandIntegration::createPlatformTheme(const QString &name) co
return GenericWaylandTheme::createUnixTheme(name);
}
+QWaylandGLIntegration *QWaylandIntegration::glIntegration() const
+{
+ return 0;
+}
+
QT_END_NAMESPACE