summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/qwaylanddisplay.cpp32
-rw-r--r--src/client/qwaylanddisplay.h14
-rw-r--r--src/client/qwaylandintegration.cpp32
-rw-r--r--src/client/qwaylandintegration.h2
-rw-r--r--src/hardwareintegration/client/brcm-egl/brcm-egl.pri13
-rw-r--r--src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.cpp (renamed from src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglintegration.cpp)0
-rw-r--r--src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.h (renamed from src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglintegration.h)0
-rw-r--r--src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.cpp (renamed from src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglwindow.cpp)0
-rw-r--r--src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.h (renamed from src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglwindow.h)0
-rw-r--r--src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.cpp (renamed from src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmglcontext.cpp)0
-rw-r--r--src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.h (renamed from src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmglcontext.h)0
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandegldisplay.h64
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandeglinclude.h (renamed from src/plugins/platforms/qwayland-egl/qwaylandeglinclude.h)0
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandeglintegration.cpp (renamed from src/plugins/platforms/qwayland-egl/qwaylandeglintegration.cpp)10
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandeglintegration.h (renamed from src/plugins/platforms/qwayland-egl/qwaylandeglintegration.h)2
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp (renamed from src/plugins/platforms/qwayland-egl/qwaylandeglwindow.cpp)2
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.h (renamed from src/plugins/platforms/qwayland-egl/qwaylandeglwindow.h)0
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp (renamed from src/plugins/platforms/qwayland-egl/qwaylandglcontext.cpp)0
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandglcontext.h (renamed from src/plugins/platforms/qwayland-egl/qwaylandglcontext.h)0
-rw-r--r--src/hardwareintegration/client/wayland-egl/wayland-egl.pri16
-rw-r--r--src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglcontext.cpp (renamed from src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglcontext.cpp)0
-rw-r--r--src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglcontext.h (renamed from src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglcontext.h)0
-rw-r--r--src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglintegration.cpp (renamed from src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglintegration.cpp)5
-rw-r--r--src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglintegration.h (renamed from src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglintegration.h)2
-rw-r--r--src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.cpp (renamed from src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglwindow.cpp)0
-rw-r--r--src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.h (renamed from src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglwindow.h)4
-rw-r--r--src/hardwareintegration/client/xcomposite-egl/xcomposite-egl.pri19
-rw-r--r--src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.cpp (renamed from src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxcontext.cpp)0
-rw-r--r--src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.h (renamed from src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxcontext.h)0
-rw-r--r--src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxintegration.cpp (renamed from src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxintegration.cpp)0
-rw-r--r--src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxintegration.h (renamed from src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxintegration.h)2
-rw-r--r--src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxwindow.cpp (renamed from src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxwindow.cpp)0
-rw-r--r--src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxwindow.h (renamed from src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxwindow.h)0
-rw-r--r--src/hardwareintegration/client/xcomposite-glx/xcomposite-glx.pri19
-rw-r--r--src/hardwareintegration/client/xcomposite_share/qwaylandxcompositebuffer.cpp (renamed from src/plugins/platforms/xcomposite_share/qwaylandxcompositebuffer.cpp)0
-rw-r--r--src/hardwareintegration/client/xcomposite_share/qwaylandxcompositebuffer.h (renamed from src/plugins/platforms/xcomposite_share/qwaylandxcompositebuffer.h)2
-rw-r--r--src/hardwareintegration/client/xcomposite_share/xcomposite_share.pri (renamed from src/plugins/platforms/xcomposite_share/xcomposite_share.pri)0
-rw-r--r--src/plugins/platforms/platforms.pro23
-rw-r--r--src/plugins/platforms/qwayland-brcm-egl/main.cpp4
-rw-r--r--src/plugins/platforms/qwayland-brcm-egl/qwayland-brcm-egl.pro15
-rw-r--r--src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglplatformintegration.h69
-rw-r--r--src/plugins/platforms/qwayland-egl/main.cpp8
-rw-r--r--src/plugins/platforms/qwayland-egl/qwayland-egl.json2
-rw-r--r--src/plugins/platforms/qwayland-egl/qwayland-egl.pro19
-rw-r--r--src/plugins/platforms/qwayland-egl/qwaylandeglplatformintegration.h70
-rw-r--r--src/plugins/platforms/qwayland-generic/main.cpp (renamed from src/plugins/platforms/qwayland-nogl/main.cpp)10
-rw-r--r--src/plugins/platforms/qwayland-generic/qwayland-generic.json3
-rw-r--r--src/plugins/platforms/qwayland-generic/qwayland-generic.pro10
-rw-r--r--src/plugins/platforms/qwayland-generic/qwaylandgenericplatformintegration.h67
-rw-r--r--src/plugins/platforms/qwayland-nogl/qwayland-nogl.json3
-rw-r--r--src/plugins/platforms/qwayland-nogl/qwayland-nogl.pro8
-rw-r--r--src/plugins/platforms/qwayland-xcomposite-egl/main.cpp8
-rw-r--r--src/plugins/platforms/qwayland-xcomposite-egl/qwayland-xcomposite-egl.pro19
-rw-r--r--src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglplatformintegration.h68
-rw-r--r--src/plugins/platforms/qwayland-xcomposite-glx/main.cpp6
-rw-r--r--src/plugins/platforms/qwayland-xcomposite-glx/qwayland-xcomposite-glx.json2
-rw-r--r--src/plugins/platforms/qwayland-xcomposite-glx/qwayland-xcomposite-glx.pro19
-rw-r--r--src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxplatformintegration.h64
58 files changed, 569 insertions, 168 deletions
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp
index d9a8b4528..4bcf2f689 100644
--- a/src/client/qwaylanddisplay.cpp
+++ b/src/client/qwaylanddisplay.cpp
@@ -42,6 +42,7 @@
#include "qwaylanddisplay.h"
#include "qwaylandeventthread.h"
+#include "qwaylandintegration.h"
#include "qwaylandwindow.h"
#include "qwaylandscreen.h"
#include "qwaylandcursor.h"
@@ -49,9 +50,7 @@
#include "qwaylandclipboard.h"
#include "qwaylanddatadevicemanager.h"
-#ifdef QT_WAYLAND_GL_SUPPORT
#include "qwaylandglintegration.h"
-#endif
#include "qwaylandwindowmanagerintegration.h"
@@ -79,14 +78,12 @@ struct wl_surface *QWaylandDisplay::createSurface(void *handle)
return surface;
}
-#ifdef QT_WAYLAND_GL_SUPPORT
-QWaylandGLIntegration * QWaylandDisplay::eglIntegration()
+QWaylandGLIntegration * QWaylandDisplay::glIntegration() const
{
- return mEglIntegration;
+ return mWaylandIntegration->glIntegration();
}
-#endif
-QWaylandWindowManagerIntegration *QWaylandDisplay::windowManagerIntegration()
+QWaylandWindowManagerIntegration *QWaylandDisplay::windowManagerIntegration() const
{
return mWindowManagerIntegration;
}
@@ -103,8 +100,9 @@ void QWaylandDisplay::setLastKeyboardFocusInputDevice(QWaylandInputDevice *devic
static QWaylandDisplay *display = 0;
-QWaylandDisplay::QWaylandDisplay()
- : mLastKeyboardFocusInputDevice(0)
+QWaylandDisplay::QWaylandDisplay(QWaylandIntegration *waylandIntegration)
+ : mWaylandIntegration(waylandIntegration)
+ , mLastKeyboardFocusInputDevice(0)
, mDndSelectionHandler(0)
, mWindowExtension(0)
, mSubSurfaceExtension(0)
@@ -134,30 +132,15 @@ QWaylandDisplay::QWaylandDisplay()
connect(mEventThreadObject, SIGNAL(newEventsRead()), this, SLOT(flushRequests()));
-#ifdef QT_WAYLAND_GL_SUPPORT
- //mEglIntegration = QWaylandGLIntegration::createGLIntegration(this);
-#endif
-
mWindowManagerIntegration = new QWaylandWindowManagerIntegration(this);
blockingReadEvents();
-#ifdef QT_WAYLAND_GL_SUPPORT
- mEglIntegration->initialize();
-
- flushRequests();
- while (mEglIntegration->waitingForEvents())
- blockingReadEvents();
-#endif
-
waitForScreens();
}
QWaylandDisplay::~QWaylandDisplay(void)
{
-#ifdef QT_WAYLAND_GL_SUPPORT
- delete mEglIntegration;
-#endif
mEventThread->quit();
mEventThread->wait();
delete mEventThreadObject;
@@ -172,6 +155,7 @@ void QWaylandDisplay::flushRequests()
wl_display_flush(mDisplay);
}
+
void QWaylandDisplay::blockingReadEvents()
{
if (wl_display_dispatch_queue(mDisplay, mEventQueue) == -1 && errno == EPIPE) {
diff --git a/src/client/qwaylanddisplay.h b/src/client/qwaylanddisplay.h
index b841a21ca..c58a45f5d 100644
--- a/src/client/qwaylanddisplay.h
+++ b/src/client/qwaylanddisplay.h
@@ -69,6 +69,7 @@ class QWaylandTouchExtension;
class QWaylandQtKeyExtension;
class QWaylandWindow;
class QWaylandEventThread;
+class QWaylandIntegration;
namespace QtWayland {
class qt_output_extension;
@@ -88,7 +89,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandDisplay : public QObject, public QtWayland
Q_OBJECT
public:
- QWaylandDisplay(void);
+ QWaylandDisplay(QWaylandIntegration *waylandIntegration);
~QWaylandDisplay(void);
QList<QPlatformScreen *> screens() const { return mScreens; }
@@ -97,11 +98,9 @@ public:
struct wl_surface *createSurface(void *handle);
-#ifdef QT_WAYLAND_GL_SUPPORT
- QWaylandGLIntegration *eglIntegration();
-#endif
+ QWaylandGLIntegration *glIntegration() const;
- QWaylandWindowManagerIntegration *windowManagerIntegration();
+ QWaylandWindowManagerIntegration *windowManagerIntegration() const;
void setCursor(struct wl_buffer *buffer, struct wl_cursor_image *image);
@@ -161,6 +160,7 @@ private:
QList<QPlatformScreen *> mScreens;
QList<QWaylandInputDevice *> mInputDevices;
QList<Listener> mRegistryListeners;
+ QWaylandIntegration *mWaylandIntegration;
QWaylandInputDevice *mLastKeyboardFocusInputDevice;
QWaylandDataDeviceManager *mDndSelectionHandler;
QtWayland::qt_surface_extension *mWindowExtension;
@@ -178,10 +178,6 @@ private:
void registry_global(uint32_t id, const QString &interface, uint32_t version) Q_DECL_OVERRIDE;
-#ifdef QT_WAYLAND_GL_SUPPORT
- QWaylandGLIntegration *mEglIntegration;
-#endif
-
static void shellHandleConfigure(void *data, struct wl_shell *shell,
uint32_t time, uint32_t edges,
struct wl_surface *surface,
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
diff --git a/src/client/qwaylandintegration.h b/src/client/qwaylandintegration.h
index 8886c28da..ebda9b284 100644
--- a/src/client/qwaylandintegration.h
+++ b/src/client/qwaylandintegration.h
@@ -49,6 +49,7 @@ QT_BEGIN_NAMESPACE
class QWaylandBuffer;
class QWaylandDisplay;
+class QWaylandGLIntegration;
class Q_WAYLAND_CLIENT_EXPORT QWaylandIntegration : public QPlatformIntegration
{
@@ -86,6 +87,7 @@ public:
QPlatformTheme *createPlatformTheme(const QString &name) const;
+ virtual QWaylandGLIntegration *glIntegration() const;
private:
QPlatformFontDatabase *mFontDb;
QPlatformClipboard *mClipboard;
diff --git a/src/hardwareintegration/client/brcm-egl/brcm-egl.pri b/src/hardwareintegration/client/brcm-egl/brcm-egl.pri
new file mode 100644
index 000000000..542c1c717
--- /dev/null
+++ b/src/hardwareintegration/client/brcm-egl/brcm-egl.pri
@@ -0,0 +1,13 @@
+INCLUDEPATH += $$PWD
+LIBS += -lEGL
+
+SOURCES += $$PWD/qwaylandbrcmeglintegration.cpp \
+ $$PWD/qwaylandbrcmglcontext.cpp \
+ $$PWD/qwaylandbrcmeglwindow.cpp
+
+HEADERS += $$PWD/qwaylandbrcmeglintegration.h \
+ $$PWD/qwaylandbrcmglcontext.h \
+ $$PWD/qwaylandbrcmeglwindow.h
+
+CONFIG += wayland-scanner
+WAYLANDCLIENTSOURCES += ../../../extensions/brcm.xml
diff --git a/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglintegration.cpp b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.cpp
index f82ad6f97..f82ad6f97 100644
--- a/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglintegration.cpp
+++ b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.cpp
diff --git a/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglintegration.h b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.h
index f1100d8de..f1100d8de 100644
--- a/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglintegration.h
+++ b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.h
diff --git a/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglwindow.cpp b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.cpp
index c7073e149..c7073e149 100644
--- a/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglwindow.cpp
+++ b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.cpp
diff --git a/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglwindow.h b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.h
index 5a3fa0461..5a3fa0461 100644
--- a/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglwindow.h
+++ b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.h
diff --git a/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmglcontext.cpp b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.cpp
index dfb86e54c..dfb86e54c 100644
--- a/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmglcontext.cpp
+++ b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.cpp
diff --git a/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmglcontext.h b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.h
index 7beef166b..7beef166b 100644
--- a/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmglcontext.h
+++ b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.h
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandegldisplay.h b/src/hardwareintegration/client/wayland-egl/qwaylandegldisplay.h
new file mode 100644
index 000000000..d7ad2fa3c
--- /dev/null
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandegldisplay.h
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWAYLANDEGLWINDOW_H
+#define QWAYLANDEGLWINDOW_H
+
+#include <QtWaylandClient/qwaylanddisplay.h>
+
+#include "qwaylandeglintegration.h"
+
+QT_BEGIN_NAMESPACE
+
+class QWaylandEglDisplay : public QWaylandDisplay
+{
+public:
+
+ QWaylandEglDisplay()
+ : QWaylandDisplay()
+ { }
+
+protected:
+ QWaylandGLIntegration *createGLIntegration()
+ { return new QWaylandEglIntegration(); }
+};
+
+QT_END_NAMESPACE
diff --git a/src/plugins/platforms/qwayland-egl/qwaylandeglinclude.h b/src/hardwareintegration/client/wayland-egl/qwaylandeglinclude.h
index 9b151a5e8..9b151a5e8 100644
--- a/src/plugins/platforms/qwayland-egl/qwaylandeglinclude.h
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglinclude.h
diff --git a/src/plugins/platforms/qwayland-egl/qwaylandeglintegration.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandeglintegration.cpp
index fd9c55859..17ad89dde 100644
--- a/src/plugins/platforms/qwayland-egl/qwaylandeglintegration.cpp
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglintegration.cpp
@@ -57,8 +57,9 @@ static const char *qwaylandegl_threadedgl_blacklist_vendor[] = {
0
};
-QWaylandEglIntegration::QWaylandEglIntegration(struct wl_display *waylandDisplay)
- : m_waylandDisplay(waylandDisplay), m_supportsThreading(false)
+QWaylandEglIntegration::QWaylandEglIntegration(QWaylandDisplay *display)
+ : m_waylandDisplay(display->wl_display())
+ , m_supportsThreading(false)
{
qDebug() << "Using Wayland-EGL";
}
@@ -120,9 +121,4 @@ EGLDisplay QWaylandEglIntegration::eglDisplay() const
return m_eglDisplay;
}
-QWaylandGLIntegration *QWaylandGLIntegration::createGLIntegration(QWaylandDisplay *waylandDisplay)
-{
- return new QWaylandEglIntegration(waylandDisplay->wl_display());
-}
-
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/qwayland-egl/qwaylandeglintegration.h b/src/hardwareintegration/client/wayland-egl/qwaylandeglintegration.h
index b26c43fe7..4e14f354a 100644
--- a/src/plugins/platforms/qwayland-egl/qwaylandeglintegration.h
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglintegration.h
@@ -54,7 +54,7 @@ class QWindow;
class QWaylandEglIntegration : public QWaylandGLIntegration
{
public:
- QWaylandEglIntegration(struct wl_display *waylandDisplay);
+ QWaylandEglIntegration(QWaylandDisplay *display);
~QWaylandEglIntegration();
void initialize();
diff --git a/src/plugins/platforms/qwayland-egl/qwaylandeglwindow.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
index 1efc4a3f0..0bcaf0e23 100644
--- a/src/plugins/platforms/qwayland-egl/qwaylandeglwindow.cpp
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
@@ -56,7 +56,7 @@ QT_BEGIN_NAMESPACE
QWaylandEglWindow::QWaylandEglWindow(QWindow *window)
: QWaylandWindow(window)
- , m_eglIntegration(static_cast<QWaylandEglIntegration *>(mDisplay->eglIntegration()))
+ , m_eglIntegration(static_cast<QWaylandEglIntegration *>(mDisplay->glIntegration()))
, m_waylandEglWindow(0)
, m_eglSurface(0)
, m_eglConfig(0)
diff --git a/src/plugins/platforms/qwayland-egl/qwaylandeglwindow.h b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.h
index b20e2ad01..b20e2ad01 100644
--- a/src/plugins/platforms/qwayland-egl/qwaylandeglwindow.h
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.h
diff --git a/src/plugins/platforms/qwayland-egl/qwaylandglcontext.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
index 92d79db36..92d79db36 100644
--- a/src/plugins/platforms/qwayland-egl/qwaylandglcontext.cpp
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
diff --git a/src/plugins/platforms/qwayland-egl/qwaylandglcontext.h b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.h
index 1da849556..1da849556 100644
--- a/src/plugins/platforms/qwayland-egl/qwaylandglcontext.h
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.h
diff --git a/src/hardwareintegration/client/wayland-egl/wayland-egl.pri b/src/hardwareintegration/client/wayland-egl/wayland-egl.pri
new file mode 100644
index 000000000..906520666
--- /dev/null
+++ b/src/hardwareintegration/client/wayland-egl/wayland-egl.pri
@@ -0,0 +1,16 @@
+INCLUDEPATH += $$PWD
+!contains(QT_CONFIG, no-pkg-config) {
+ CONFIG += link_pkgconfig
+ PKGCONFIG += wayland-egl egl
+} else {
+ LIBS += -lwayland-egl -lEGL
+}
+
+SOURCES += $$PWD/qwaylandeglintegration.cpp \
+ $$PWD/qwaylandglcontext.cpp \
+ $$PWD/qwaylandeglwindow.cpp
+
+HEADERS += $$PWD/qwaylandeglintegration.h \
+ $$PWD/qwaylandglcontext.h \
+ $$PWD/qwaylandeglwindow.h \
+ $$PWD/qwaylandeglinclude.h
diff --git a/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglcontext.cpp b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglcontext.cpp
index 8d4a99b97..8d4a99b97 100644
--- a/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglcontext.cpp
+++ b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglcontext.cpp
diff --git a/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglcontext.h b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglcontext.h
index 32cdb4322..32cdb4322 100644
--- a/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglcontext.h
+++ b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglcontext.h
diff --git a/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglintegration.cpp b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglintegration.cpp
index cd3a06ff8..ae644e944 100644
--- a/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglintegration.cpp
+++ b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglintegration.cpp
@@ -49,11 +49,6 @@
QT_BEGIN_NAMESPACE
-QWaylandGLIntegration * QWaylandGLIntegration::createGLIntegration(QWaylandDisplay *waylandDisplay)
-{
- return new QWaylandXCompositeEGLIntegration(waylandDisplay);
-}
-
QWaylandXCompositeEGLIntegration::QWaylandXCompositeEGLIntegration(QWaylandDisplay * waylandDisplay)
: QWaylandGLIntegration()
, mWaylandDisplay(waylandDisplay)
diff --git a/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglintegration.h b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglintegration.h
index ba36fac3f..1c165d817 100644
--- a/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglintegration.h
+++ b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglintegration.h
@@ -42,7 +42,7 @@
#ifndef QWAYLANDXCOMPOSITEEGLINTEGRATION_H
#define QWAYLANDXCOMPOSITEEGLINTEGRATION_H
-#include "qwaylandglintegration.h"
+#include <QtWaylandClient/qwaylandglintegration.h>
#include "wayland-client.h"
#include <QtCore/QTextStream>
diff --git a/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglwindow.cpp b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.cpp
index f0df2bd2d..f0df2bd2d 100644
--- a/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglwindow.cpp
+++ b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.cpp
diff --git a/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglwindow.h b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.h
index 8fb631185..bd37ee7cf 100644
--- a/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglwindow.h
+++ b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.h
@@ -42,8 +42,8 @@
#ifndef QWAYLANDXCOMPOSITEEGLWINDOW_H
#define QWAYLANDXCOMPOSITEEGLWINDOW_H
-#include "qwaylandwindow.h"
-#include "qwaylandbuffer.h"
+#include <QtWaylandClient/qwaylandwindow.h>
+#include <QtWaylandClient/qwaylandbuffer.h>
#include "qwaylandxcompositeeglintegration.h"
#include "qwaylandxcompositeeglcontext.h"
diff --git a/src/hardwareintegration/client/xcomposite-egl/xcomposite-egl.pri b/src/hardwareintegration/client/xcomposite-egl/xcomposite-egl.pri
new file mode 100644
index 000000000..fc34575f5
--- /dev/null
+++ b/src/hardwareintegration/client/xcomposite-egl/xcomposite-egl.pri
@@ -0,0 +1,19 @@
+INCLUDEPATH += $$PWD
+include($$PWD/../xcomposite_share/xcomposite_share.pri)
+
+!contains(QT_CONFIG, no-pkg-config) {
+ CONFIG += link_pkgconfig
+ PKGCONFIG += xcomposite egl x11
+} else {
+ LIBS += -lXcomposite -lEGL -lX11
+}
+
+SOURCES += \
+ $$PWD/qwaylandxcompositeeglcontext.cpp \
+ $$PWD/qwaylandxcompositeeglintegration.cpp \
+ $$PWD/qwaylandxcompositeeglwindow.cpp
+
+HEADERS += \
+ $$PWD/qwaylandxcompositeeglcontext.h \
+ $$PWD/qwaylandxcompositeeglintegration.h \
+ $$PWD/qwaylandxcompositeeglwindow.h
diff --git a/src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxcontext.cpp b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.cpp
index 6854dc3b2..6854dc3b2 100644
--- a/src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxcontext.cpp
+++ b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.cpp
diff --git a/src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxcontext.h b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.h
index de0311262..de0311262 100644
--- a/src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxcontext.h
+++ b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.h
diff --git a/src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxintegration.cpp b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxintegration.cpp
index 2e8b444f9..2e8b444f9 100644
--- a/src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxintegration.cpp
+++ b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxintegration.cpp
diff --git a/src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxintegration.h b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxintegration.h
index aeb7c66de..f47f03eb2 100644
--- a/src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxintegration.h
+++ b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxintegration.h
@@ -42,7 +42,7 @@
#ifndef QWAYLANDXCOMPOSITEGLXINTEGRATION_H
#define QWAYLANDXCOMPOSITEGLXINTEGRATION_H
-#include "qwaylandglintegration.h"
+#include <QtWaylandClient/qwaylandglintegration.h>
#include "wayland-client.h"
#include <QtCore/QTextStream>
diff --git a/src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxwindow.cpp b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxwindow.cpp
index 3a64961f1..3a64961f1 100644
--- a/src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxwindow.cpp
+++ b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxwindow.cpp
diff --git a/src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxwindow.h b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxwindow.h
index b436cbbe6..b436cbbe6 100644
--- a/src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxwindow.h
+++ b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxwindow.h
diff --git a/src/hardwareintegration/client/xcomposite-glx/xcomposite-glx.pri b/src/hardwareintegration/client/xcomposite-glx/xcomposite-glx.pri
new file mode 100644
index 000000000..cc41322bb
--- /dev/null
+++ b/src/hardwareintegration/client/xcomposite-glx/xcomposite-glx.pri
@@ -0,0 +1,19 @@
+INCLUDEPATH += $$PWD
+include ($$PWD/../xcomposite_share/xcomposite_share.pri)
+
+!contains(QT_CONFIG, no-pkg-config) {
+ CONFIG += link_pkgconfig
+ PKGCONFIG += xcomposite gl x11
+} else {
+ LIBS += -lXcomposite -lGL -lX11
+}
+
+SOURCES += \
+ $$PWD/qwaylandxcompositeglxcontext.cpp \
+ $$PWD/qwaylandxcompositeglxintegration.cpp \
+ $$PWD/qwaylandxcompositeglxwindow.cpp
+
+HEADERS += \
+ $$PWD/qwaylandxcompositeglxcontext.h \
+ $$PWD/qwaylandxcompositeglxintegration.h \
+ $$PWD/qwaylandxcompositeglxwindow.h
diff --git a/src/plugins/platforms/xcomposite_share/qwaylandxcompositebuffer.cpp b/src/hardwareintegration/client/xcomposite_share/qwaylandxcompositebuffer.cpp
index c65ad4a1a..c65ad4a1a 100644
--- a/src/plugins/platforms/xcomposite_share/qwaylandxcompositebuffer.cpp
+++ b/src/hardwareintegration/client/xcomposite_share/qwaylandxcompositebuffer.cpp
diff --git a/src/plugins/platforms/xcomposite_share/qwaylandxcompositebuffer.h b/src/hardwareintegration/client/xcomposite_share/qwaylandxcompositebuffer.h
index e70012419..934abb531 100644
--- a/src/plugins/platforms/xcomposite_share/qwaylandxcompositebuffer.h
+++ b/src/hardwareintegration/client/xcomposite_share/qwaylandxcompositebuffer.h
@@ -42,7 +42,7 @@
#ifndef QWAYLANDXCOMPOSITEBUFFER_H
#define QWAYLANDXCOMPOSITEBUFFER_H
-#include "qwaylandbuffer.h"
+#include <QtWaylandClient/qwaylandbuffer.h>
#include <stdint.h>
struct qt_xcomposite;
diff --git a/src/plugins/platforms/xcomposite_share/xcomposite_share.pri b/src/hardwareintegration/client/xcomposite_share/xcomposite_share.pri
index be3c9fc1b..be3c9fc1b 100644
--- a/src/plugins/platforms/xcomposite_share/xcomposite_share.pri
+++ b/src/hardwareintegration/client/xcomposite_share/xcomposite_share.pri
diff --git a/src/plugins/platforms/platforms.pro b/src/plugins/platforms/platforms.pro
index ab8c9347e..0665511c5 100644
--- a/src/plugins/platforms/platforms.pro
+++ b/src/plugins/platforms/platforms.pro
@@ -1,11 +1,22 @@
TEMPLATE=subdirs
CONFIG+=ordered
-equals(QT_WAYLAND_GL_CONFIG, nogl) {
- SUBDIRS += qwayland-nogl
-} else {
- config_wayland_egl {
- SUBDIRS += qwayland-egl
- }
+SUBDIRS += qwayland-generic
+
+config_wayland_egl {
+ SUBDIRS += qwayland-egl
+}
+#The following integrations are only useful with QtCompositor
+contains(CONFIG, wayland-compositor) {
+ config_brcm_egl: \
+ SUBDIRS += qwayland-brcm-egl
+
+ config_xcomposite {
+ config_egl: \
+ SUBDIRS += qwayland-xcomposite-egl
+ !contains(QT_CONFIG, opengles2):config_glx: \
+ SUBDIRS += qwayland-xcomposite-glx
+ }
}
+
diff --git a/src/plugins/platforms/qwayland-brcm-egl/main.cpp b/src/plugins/platforms/qwayland-brcm-egl/main.cpp
index 663d18b31..c8c4eef12 100644
--- a/src/plugins/platforms/qwayland-brcm-egl/main.cpp
+++ b/src/plugins/platforms/qwayland-brcm-egl/main.cpp
@@ -40,7 +40,7 @@
****************************************************************************/
#include <qpa/qplatformintegrationplugin.h>
-#include "qwaylandintegration.h"
+#include "qwaylandbrcmeglplatformintegration.h"
QT_BEGIN_NAMESPACE
@@ -64,7 +64,7 @@ QPlatformIntegration *QWaylandIntegrationPlugin::create(const QString& system, c
{
Q_UNUSED(paramList);
if (system.toLower() == "wayland-brcm")
- return new QWaylandIntegration();
+ return new QWaylandBrcmEglPlatformIntegration();
return 0;
}
diff --git a/src/plugins/platforms/qwayland-brcm-egl/qwayland-brcm-egl.pro b/src/plugins/platforms/qwayland-brcm-egl/qwayland-brcm-egl.pro
index 070b7bce7..31bc718ff 100644
--- a/src/plugins/platforms/qwayland-brcm-egl/qwayland-brcm-egl.pro
+++ b/src/plugins/platforms/qwayland-brcm-egl/qwayland-brcm-egl.pro
@@ -1,21 +1,14 @@
PLUGIN_TYPE = platforms
load(qt_plugin)
-include(../wayland_common/wayland_common.pri)
+QT += waylandclient-private
+
+include(../../../hardwareintegration/client/brcm-egl/brcm-egl.pri)
LIBS += -lEGL
OTHER_FILES += \
qwayland-brcm-egl.json
-SOURCES += qwaylandbrcmeglintegration.cpp \
- qwaylandbrcmglcontext.cpp \
- qwaylandbrcmeglwindow.cpp \
- main.cpp
-
-HEADERS += qwaylandbrcmeglintegration.h \
- qwaylandbrcmglcontext.h \
- qwaylandbrcmeglwindow.h
+SOURCES += main.cpp
-CONFIG += wayland-scanner
-WAYLANDCLIENTSOURCES += ../../../extensions/brcm.xml
diff --git a/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglplatformintegration.h b/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglplatformintegration.h
new file mode 100644
index 000000000..7dbe82fee
--- /dev/null
+++ b/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglplatformintegration.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWAYLANDBRCMEGLPLATFORMINTEGRATION_H
+#define QWAYLANDBRCMEGLPLATFORMINTEGRATION_H
+
+#include <QtWaylandClient/qwaylandintegration.h>
+#include "qwaylandbrcmeglintegration.h"
+
+QT_BEGIN_NAMESPACE
+
+class QWaylandBrcmEglPlatformIntegration : public QWaylandIntegration
+{
+public:
+ QWaylandBrcmEglPlatformIntegration()
+ : QWaylandIntegration()
+ , m_gl_integration(new QWaylandBrcmEglIntegration(display())
+ {
+ }
+
+ QWaylandGLIntegration *glIntegration() const Q_DECL_OVERRIDE
+ {
+ return m_gl_integration;
+ }
+private:
+ QWaylandGLIntegration *m_gl_integration;
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/plugins/platforms/qwayland-egl/main.cpp b/src/plugins/platforms/qwayland-egl/main.cpp
index e5a0a2c64..6f790a14a 100644
--- a/src/plugins/platforms/qwayland-egl/main.cpp
+++ b/src/plugins/platforms/qwayland-egl/main.cpp
@@ -40,7 +40,7 @@
****************************************************************************/
#include <qpa/qplatformintegrationplugin.h>
-#include "qwaylandintegration.h"
+#include "qwaylandeglplatformintegration.h"
QT_BEGIN_NAMESPACE
@@ -56,15 +56,15 @@ public:
QStringList QWaylandIntegrationPlugin::keys() const
{
QStringList list;
- list << "wayland" << "wayland-egl";
+ list << "wayland-egl";
return list;
}
QPlatformIntegration *QWaylandIntegrationPlugin::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
- if (system.toLower() == "wayland" || system.toLower() == "wayland-egl")
- return new QWaylandIntegration();
+ if (system.toLower() == "wayland-egl")
+ return new QWaylandEglPlatformIntegration();
return 0;
}
diff --git a/src/plugins/platforms/qwayland-egl/qwayland-egl.json b/src/plugins/platforms/qwayland-egl/qwayland-egl.json
index 3ab70d3c3..4ea5bab90 100644
--- a/src/plugins/platforms/qwayland-egl/qwayland-egl.json
+++ b/src/plugins/platforms/qwayland-egl/qwayland-egl.json
@@ -1,3 +1,3 @@
{
- "Keys": [ "wayland", "wayland-egl" ]
+ "Keys": [ "wayland-egl" ]
}
diff --git a/src/plugins/platforms/qwayland-egl/qwayland-egl.pro b/src/plugins/platforms/qwayland-egl/qwayland-egl.pro
index 7f8c7f3aa..279a7c382 100644
--- a/src/plugins/platforms/qwayland-egl/qwayland-egl.pro
+++ b/src/plugins/platforms/qwayland-egl/qwayland-egl.pro
@@ -3,23 +3,10 @@ load(qt_plugin)
QT += waylandclient-private
+include(../../../hardwareintegration/client/wayland-egl/wayland-egl.pri)
+
OTHER_FILES += \
qwayland-egl.json
-DEFINES += QT_WAYLAND_GL_SUPPORT
-!contains(QT_CONFIG, no-pkg-config) {
- CONFIG += link_pkgconfig
- PKGCONFIG += wayland-egl egl
-} else {
- LIBS += -lwayland-egl -lEGL
-}
-
-SOURCES += qwaylandeglintegration.cpp \
- qwaylandglcontext.cpp \
- qwaylandeglwindow.cpp \
- main.cpp
+SOURCES += main.cpp
-HEADERS += qwaylandeglintegration.h \
- qwaylandglcontext.h \
- qwaylandeglwindow.h \
- qwaylandeglinclude.h
diff --git a/src/plugins/platforms/qwayland-egl/qwaylandeglplatformintegration.h b/src/plugins/platforms/qwayland-egl/qwaylandeglplatformintegration.h
new file mode 100644
index 000000000..c9c288feb
--- /dev/null
+++ b/src/plugins/platforms/qwayland-egl/qwaylandeglplatformintegration.h
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWAYLANDEGLPLATFORMINTEGRATION_H
+#define QWAYLANDEGLPLATFORMINTEGRATION_H
+
+#include <QtWaylandClient/qwaylandintegration.h>
+
+#include "qwaylandeglintegration.h"
+
+QT_BEGIN_NAMESPACE
+
+class QWaylandEglPlatformIntegration : public QWaylandIntegration
+{
+public:
+ QWaylandEglPlatformIntegration()
+ : QWaylandIntegration()
+ , m_gl_integration(new QWaylandEglIntegration(display()))
+ {
+ m_gl_integration->initialize();
+ }
+
+ QWaylandGLIntegration *glIntegration() const
+ { return m_gl_integration; }
+
+private:
+ QWaylandGLIntegration *m_gl_integration;
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/plugins/platforms/qwayland-nogl/main.cpp b/src/plugins/platforms/qwayland-generic/main.cpp
index d0bdf7f00..15a7a9f52 100644
--- a/src/plugins/platforms/qwayland-nogl/main.cpp
+++ b/src/plugins/platforms/qwayland-generic/main.cpp
@@ -40,14 +40,14 @@
****************************************************************************/
#include <qpa/qplatformintegrationplugin.h>
-#include "qwaylandintegration.h"
+#include "qwaylandgenericplatformintegration.h"
QT_BEGIN_NAMESPACE
class QWaylandIntegrationPlugin : public QPlatformIntegrationPlugin
{
Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.2" FILE "qwayland-nogl.json")
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.2" FILE "qwayland-generic.json")
public:
QStringList keys() const;
QPlatformIntegration *create(const QString&, const QStringList&);
@@ -56,15 +56,15 @@ public:
QStringList QWaylandIntegrationPlugin::keys() const
{
QStringList list;
- list << "wayland" << "wayland-nogl";
+ list << "wayland";
return list;
}
QPlatformIntegration *QWaylandIntegrationPlugin::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
- if (system.toLower() == "wayland" || system.toLower() == "wayland-nogl")
- return new QWaylandIntegration();
+ if (system.toLower() == "wayland")
+ return new QWaylandGenericPlatformIntegration();
return 0;
}
diff --git a/src/plugins/platforms/qwayland-generic/qwayland-generic.json b/src/plugins/platforms/qwayland-generic/qwayland-generic.json
new file mode 100644
index 000000000..8e56c4fd8
--- /dev/null
+++ b/src/plugins/platforms/qwayland-generic/qwayland-generic.json
@@ -0,0 +1,3 @@
+{
+ "Keys": [ "wayland" ]
+}
diff --git a/src/plugins/platforms/qwayland-generic/qwayland-generic.pro b/src/plugins/platforms/qwayland-generic/qwayland-generic.pro
new file mode 100644
index 000000000..cf42d1eb8
--- /dev/null
+++ b/src/plugins/platforms/qwayland-generic/qwayland-generic.pro
@@ -0,0 +1,10 @@
+PLUGIN_TYPE = platforms
+load(qt_plugin)
+
+QT += waylandclient-private
+
+OTHER_FILES += \
+ qwayland-generic.json
+
+SOURCES += main.cpp
+
diff --git a/src/plugins/platforms/qwayland-generic/qwaylandgenericplatformintegration.h b/src/plugins/platforms/qwayland-generic/qwaylandgenericplatformintegration.h
new file mode 100644
index 000000000..0d742e93a
--- /dev/null
+++ b/src/plugins/platforms/qwayland-generic/qwaylandgenericplatformintegration.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWAYLANDEGLPLATFORMINTEGRATION_H
+#define QWAYLANDEGLPLATFORMINTEGRATION_H
+
+#include <QtWaylandClient/qwaylandintegration.h>
+
+QT_BEGIN_NAMESPACE
+
+class QWaylandGenericPlatformIntegration : public QWaylandIntegration
+{
+public:
+ QWaylandGenericPlatformIntegration()
+ : QWaylandIntegration()
+ , m_gl_integration(0)
+ {
+ }
+
+ QWaylandGLIntegration *glIntegration() const
+ { return m_gl_integration; }
+
+private:
+ QWaylandGLIntegration *m_gl_integration;
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/plugins/platforms/qwayland-nogl/qwayland-nogl.json b/src/plugins/platforms/qwayland-nogl/qwayland-nogl.json
deleted file mode 100644
index 8cbc863f9..000000000
--- a/src/plugins/platforms/qwayland-nogl/qwayland-nogl.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "Keys": [ "wayland", "wayland-nogl" ]
-}
diff --git a/src/plugins/platforms/qwayland-nogl/qwayland-nogl.pro b/src/plugins/platforms/qwayland-nogl/qwayland-nogl.pro
deleted file mode 100644
index cb3b86eb5..000000000
--- a/src/plugins/platforms/qwayland-nogl/qwayland-nogl.pro
+++ /dev/null
@@ -1,8 +0,0 @@
-PLUGIN_TYPE = platforms
-load(qt_plugin)
-
-include(../wayland_common/wayland_common.pri)
-
-OTHER_FILES += qwayland-nogl.json
-
-SOURCES += main.cpp
diff --git a/src/plugins/platforms/qwayland-xcomposite-egl/main.cpp b/src/plugins/platforms/qwayland-xcomposite-egl/main.cpp
index 0d6bcffe0..b065a4659 100644
--- a/src/plugins/platforms/qwayland-xcomposite-egl/main.cpp
+++ b/src/plugins/platforms/qwayland-xcomposite-egl/main.cpp
@@ -40,7 +40,7 @@
****************************************************************************/
#include <qpa/qplatformintegrationplugin.h>
-#include "qwaylandintegration.h"
+#include "qwaylandxcompositeeglplatformintegration.h"
QT_BEGIN_NAMESPACE
@@ -56,15 +56,15 @@ public:
QStringList QWaylandIntegrationPlugin::keys() const
{
QStringList list;
- list << "wayland-xcomposite";
+ list << "wayland-xcomposite" << "wayland-xcomposite-egl";
return list;
}
QPlatformIntegration *QWaylandIntegrationPlugin::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
- if (system.toLower() == "wayland-xcomposite")
- return new QWaylandIntegration();
+ if (system.toLower() == "wayland-xcomposite" || system.toLower() == "wayland-xcomposite-egl")
+ return new QWaylandXCompositeEglPlatformIntegration();
return 0;
}
diff --git a/src/plugins/platforms/qwayland-xcomposite-egl/qwayland-xcomposite-egl.pro b/src/plugins/platforms/qwayland-xcomposite-egl/qwayland-xcomposite-egl.pro
index b691ec9dc..74a71a57a 100644
--- a/src/plugins/platforms/qwayland-xcomposite-egl/qwayland-xcomposite-egl.pro
+++ b/src/plugins/platforms/qwayland-xcomposite-egl/qwayland-xcomposite-egl.pro
@@ -1,25 +1,12 @@
PLUGIN_TYPE = platforms
load(qt_plugin)
-include(../wayland_common/wayland_common.pri)
-include (../xcomposite_share/xcomposite_share.pri)
+QT += waylandclient-private
-OTHER_FILES += qwayland-xcomposite-egl.json
+include(../../../hardwareintegration/client/xcomposite-egl/xcomposite-egl.pri)
-!contains(QT_CONFIG, no-pkg-config) {
- CONFIG += link_pkgconfig
- PKGCONFIG += xcomposite egl x11
-} else {
- LIBS += -lXcomposite -lEGL -lX11
-}
+OTHER_FILES += qwayland-xcomposite-egl.json
SOURCES += \
- qwaylandxcompositeeglcontext.cpp \
- qwaylandxcompositeeglintegration.cpp \
- qwaylandxcompositeeglwindow.cpp \
main.cpp
-HEADERS += \
- qwaylandxcompositeeglcontext.h \
- qwaylandxcompositeeglintegration.h \
- qwaylandxcompositeeglwindow.h
diff --git a/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglplatformintegration.h b/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglplatformintegration.h
new file mode 100644
index 000000000..0bcd128da
--- /dev/null
+++ b/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglplatformintegration.h
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWAYLANDXCOMPOSITEEGLPLATFROMINTEGRATION_H
+#define QWAYLANDXCOMPOSITEEGLPLATFROMINTEGRATION_H
+
+#include <QtWaylandClient/qwaylandintegration.h>
+
+#include "qwaylandxcompositeeglintegration.h"
+
+QT_BEGIN_NAMESPACE
+
+class QWaylandXCompositeEglPlatformIntegration : public QWaylandIntegration
+{
+public:
+ QWaylandXCompositeEglPlatformIntegration()
+ : QWaylandIntegration()
+ , m_gl_integration(new QWaylandXCompositeEGLIntegration(display()))
+ { }
+
+ QWaylandGLIntegration *glIntegration() const Q_DECL_OVERRIDE
+ { return m_gl_integration; }
+
+private:
+ QWaylandGLIntegration *m_gl_integration;
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/plugins/platforms/qwayland-xcomposite-glx/main.cpp b/src/plugins/platforms/qwayland-xcomposite-glx/main.cpp
index 98ca13845..17b20f987 100644
--- a/src/plugins/platforms/qwayland-xcomposite-glx/main.cpp
+++ b/src/plugins/platforms/qwayland-xcomposite-glx/main.cpp
@@ -56,15 +56,15 @@ public:
QStringList QWaylandIntegrationPlugin::keys() const
{
QStringList list;
- list << "wayland-xcomposite";
+ list << "wayland-xcomposite-glx";
return list;
}
QPlatformIntegration *QWaylandIntegrationPlugin::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
- if (system.toLower() == "wayland-xcomposite")
- return new QWaylandIntegration();
+ if (system.toLower() == "wayland-xcomposite-glx")
+ return new QWaylandXCompositeGlxPlatformIntegration();
return 0;
}
diff --git a/src/plugins/platforms/qwayland-xcomposite-glx/qwayland-xcomposite-glx.json b/src/plugins/platforms/qwayland-xcomposite-glx/qwayland-xcomposite-glx.json
index 8ccd5b46b..0f4a3bf69 100644
--- a/src/plugins/platforms/qwayland-xcomposite-glx/qwayland-xcomposite-glx.json
+++ b/src/plugins/platforms/qwayland-xcomposite-glx/qwayland-xcomposite-glx.json
@@ -1,3 +1,3 @@
{
- "Keys": [ "wayland-xcomposite" ]
+ "Keys": [ "wayland-xcomposite-glx" ]
}
diff --git a/src/plugins/platforms/qwayland-xcomposite-glx/qwayland-xcomposite-glx.pro b/src/plugins/platforms/qwayland-xcomposite-glx/qwayland-xcomposite-glx.pro
index 6d7041085..dcf2e1b67 100644
--- a/src/plugins/platforms/qwayland-xcomposite-glx/qwayland-xcomposite-glx.pro
+++ b/src/plugins/platforms/qwayland-xcomposite-glx/qwayland-xcomposite-glx.pro
@@ -1,25 +1,12 @@
PLUGIN_TYPE = platforms
load(qt_plugin)
-include(../wayland_common/wayland_common.pri)
-include (../xcomposite_share/xcomposite_share.pri)
+QT += waylandclient-private
-OTHER_FILES += qwayland-xcomposite-glx.json
+include(../../../hardwareintegration/client/xcomposite-glx/xcomposite-glx.pri)
-!contains(QT_CONFIG, no-pkg-config) {
- CONFIG += link_pkgconfig
- PKGCONFIG += xcomposite gl x11
-} else {
- LIBS += -lXcomposite -lGL -lX11
-}
+OTHER_FILES += qwayland-xcomposite-glx.json
SOURCES += \
- qwaylandxcompositeglxcontext.cpp \
- qwaylandxcompositeglxintegration.cpp \
- qwaylandxcompositeglxwindow.cpp \
main.cpp
-HEADERS += \
- qwaylandxcompositeglxcontext.h \
- qwaylandxcompositeglxintegration.h \
- qwaylandxcompositeglxwindow.h
diff --git a/src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxplatformintegration.h b/src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxplatformintegration.h
new file mode 100644
index 000000000..fe8c5b7c5
--- /dev/null
+++ b/src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxplatformintegration.h
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWAYLANDXCOMPOSITEGLXPLATFORMINTEGRATION_H
+#define QWAYLANDXCOMPOSITEGLXPLATFORMINTEGRATION_H
+
+#include <QtWaylandClient/qwaylandintegration.h>
+
+#include "qwaylandxcompositeglxintegration.h"
+
+class QWaylandXCompositeGlxPlatformIntegration : public QWaylandIntegration
+{
+public:
+ QWaylandXCompositeGlxPlatformIntegration()
+ : QWaylandIntegration()
+ , m_gl_integration(new QWaylandXCompositeGLXIntegration(display()))
+ { }
+
+ QWaylandGLIntegration *glIntegration() const Q_DECL_OVERRIDE
+ { return m_gl_integration; }
+
+private:
+ QWaylandGLIntegration *m_gl_integration;
+};
+
+#endif