summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJorgen Lind <jorgen.lind@digia.com>2013-11-21 13:43:23 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-27 15:32:43 +0100
commitab30cabb6383413ee3b2913615d75082c0c55686 (patch)
tree34ec3571f79dcb4e25f01467abe6c7516e9a10d2
parent543e34f643efd7fdd3126244a8a6b2596fb21da4 (diff)
Rename QWaylandGLIntegration to QWaylandClientBufferIntegration
also add a factory to load QWaylandClientBufferIntegrationPlugins Change-Id: Ia6a03627659b0452439ae664fceef21eaf0f6de0 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
-rw-r--r--src/client/client.pro5
-rw-r--r--src/client/hardwareintegration/hardwareintegration.pri10
-rw-r--r--src/client/hardwareintegration/qwaylandclientbufferintegration.cpp (renamed from src/client/qwaylandglintegration.cpp)6
-rw-r--r--src/client/hardwareintegration/qwaylandclientbufferintegration.h (renamed from src/client/qwaylandglintegration.h)14
-rw-r--r--src/client/hardwareintegration/qwaylandclientbufferintegrationfactory.cpp96
-rw-r--r--src/client/hardwareintegration/qwaylandclientbufferintegrationfactory.h61
-rw-r--r--src/client/hardwareintegration/qwaylandclientbufferintegrationplugin.cpp (renamed from src/plugins/platforms/qwayland-generic/qwaylandgenericplatformintegration.h)28
-rw-r--r--src/client/hardwareintegration/qwaylandclientbufferintegrationplugin.h69
-rw-r--r--src/client/qwaylanddisplay.cpp6
-rw-r--r--src/client/qwaylanddisplay.h4
-rw-r--r--src/client/qwaylandintegration.cpp43
-rw-r--r--src/client/qwaylandintegration.h8
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp (renamed from src/hardwareintegration/client/wayland-egl/qwaylandeglintegration.cpp)18
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.h (renamed from src/hardwareintegration/client/wayland-egl/qwaylandeglintegration.h)8
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp10
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.h4
-rw-r--r--src/hardwareintegration/client/wayland-egl/wayland-egl.pri4
-rw-r--r--src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglclientbufferintegration.cpp (renamed from src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglintegration.cpp)38
-rw-r--r--src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglclientbufferintegration.h (renamed from src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglintegration.h)14
-rw-r--r--src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglcontext.h2
-rw-r--r--src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.cpp4
-rw-r--r--src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.h6
-rw-r--r--src/hardwareintegration/client/xcomposite-egl/xcomposite-egl.pri4
-rw-r--r--src/plugins/platforms/qwayland-egl/qwaylandeglplatformintegration.h12
-rw-r--r--src/plugins/platforms/qwayland-generic/main.cpp4
-rw-r--r--src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglplatformintegration.h10
26 files changed, 365 insertions, 123 deletions
diff --git a/src/client/client.pro b/src/client/client.pro
index 7aac1d1b6..152370c0b 100644
--- a/src/client/client.pro
+++ b/src/client/client.pro
@@ -95,7 +95,4 @@ HEADERS += qwaylandintegration.h \
qwaylandinputcontext.h \
qwaylanddatadevice.h \
-contains(DEFINES, QT_WAYLAND_GL_SUPPORT) {
- SOURCES += qwaylandglintegration.cpp
- HEADERS += qwaylandglintegration.h
-}
+include(hardwareintegration/hardwareintegration.pri)
diff --git a/src/client/hardwareintegration/hardwareintegration.pri b/src/client/hardwareintegration/hardwareintegration.pri
new file mode 100644
index 000000000..2ed95368f
--- /dev/null
+++ b/src/client/hardwareintegration/hardwareintegration.pri
@@ -0,0 +1,10 @@
+SOURCES += \
+ $$PWD/qwaylandclientbufferintegration.cpp \
+ $$PWD/qwaylandclientbufferintegrationplugin.cpp \
+ $$PWD/qwaylandclientbufferintegrationfactory.cpp
+
+HEADERS += \
+ $$PWD/qwaylandclientbufferintegration.h \
+ $$PWD/qwaylandclientbufferintegrationplugin.h \
+ $$PWD/qwaylandclientbufferintegrationfactory.h
+
diff --git a/src/client/qwaylandglintegration.cpp b/src/client/hardwareintegration/qwaylandclientbufferintegration.cpp
index bafb99443..c04ee1772 100644
--- a/src/client/qwaylandglintegration.cpp
+++ b/src/client/hardwareintegration/qwaylandclientbufferintegration.cpp
@@ -39,16 +39,16 @@
**
****************************************************************************/
-#include "qwaylandglintegration.h"
+#include "qwaylandclientbufferintegration.h"
QT_BEGIN_NAMESPACE
-QWaylandGLIntegration::QWaylandGLIntegration()
+QWaylandClientBufferIntegration::QWaylandClientBufferIntegration()
{
}
-QWaylandGLIntegration::~QWaylandGLIntegration()
+QWaylandClientBufferIntegration::~QWaylandClientBufferIntegration()
{
}
diff --git a/src/client/qwaylandglintegration.h b/src/client/hardwareintegration/qwaylandclientbufferintegration.h
index 7697d3103..12468537e 100644
--- a/src/client/qwaylandglintegration.h
+++ b/src/client/hardwareintegration/qwaylandclientbufferintegration.h
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#ifndef QWAYLANDGLINTEGRATION_H
-#define QWAYLANDGLINTEGRATION_H
+#ifndef QWAYLANDCLIENTBUFFERINTEGRATION_H
+#define QWAYLANDCLIENTBUFFERINTEGRATION_H
#include <QtCore/qglobal.h>
#include <QtWaylandClient/qwaylandclientexport.h>
@@ -54,11 +54,11 @@ class QWindow;
class QPlatformOpenGLContext;
class QSurfaceFormat;
-class Q_WAYLAND_CLIENT_EXPORT QWaylandGLIntegration
+class Q_WAYLAND_CLIENT_EXPORT QWaylandClientBufferIntegration
{
public:
- QWaylandGLIntegration();
- virtual ~QWaylandGLIntegration();
+ QWaylandClientBufferIntegration();
+ virtual ~QWaylandClientBufferIntegration();
virtual void initialize() = 0;
virtual bool waitingForEvents() { return false; }
@@ -68,9 +68,9 @@ public:
virtual QWaylandWindow *createEglWindow(QWindow *window) = 0;
virtual QPlatformOpenGLContext *createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const = 0;
- static QWaylandGLIntegration *createGLIntegration(QWaylandDisplay *waylandDisplay);
+ static QWaylandClientBufferIntegration *createGLIntegration(QWaylandDisplay *waylandDisplay);
};
QT_END_NAMESPACE
-#endif // QWAYLANDGLINTEGRATION_H
+#endif // QWAYLANDCLIENTBUFFERINTEGRATION_H
diff --git a/src/client/hardwareintegration/qwaylandclientbufferintegrationfactory.cpp b/src/client/hardwareintegration/qwaylandclientbufferintegrationfactory.cpp
new file mode 100644
index 000000000..c87c016f5
--- /dev/null
+++ b/src/client/hardwareintegration/qwaylandclientbufferintegrationfactory.cpp
@@ -0,0 +1,96 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the QtGui module 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$
+**
+****************************************************************************/
+
+#include "qwaylandclientbufferintegrationfactory.h"
+#include "qwaylandclientbufferintegrationplugin.h"
+#include "qwaylandclientbufferintegration.h"
+#include <QtCore/private/qfactoryloader_p.h>
+#include <QtCore/QCoreApplication>
+#include <QtCore/QDir>
+
+QT_BEGIN_NAMESPACE
+
+#ifndef QT_NO_LIBRARY
+Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
+ (QWaylandClientBufferIntegrationFactoryInterface_iid, QLatin1String("/wayland-graphics-integration/client"), Qt::CaseInsensitive))
+Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader,
+ (QWaylandClientBufferIntegrationFactoryInterface_iid, QLatin1String(""), Qt::CaseInsensitive))
+#endif
+
+QStringList QWaylandClientBufferIntegrationFactory::keys(const QString &pluginPath)
+{
+#ifndef QT_NO_LIBRARY
+ QStringList list;
+ if (!pluginPath.isEmpty()) {
+ QCoreApplication::addLibraryPath(pluginPath);
+ list = directLoader()->keyMap().values();
+ if (!list.isEmpty()) {
+ const QString postFix = QStringLiteral(" (from ")
+ + QDir::toNativeSeparators(pluginPath)
+ + QLatin1Char(')');
+ const QStringList::iterator end = list.end();
+ for (QStringList::iterator it = list.begin(); it != end; ++it)
+ (*it).append(postFix);
+ }
+ }
+ list.append(loader()->keyMap().values());
+ return list;
+#else
+ return QStringList();
+#endif
+}
+
+QWaylandClientBufferIntegration *QWaylandClientBufferIntegrationFactory::create(const QString &name, const QStringList &args, const QString &pluginPath)
+{
+#ifndef QT_NO_LIBRARY
+ // Try loading the plugin from platformPluginPath first:
+ if (!pluginPath.isEmpty()) {
+ QCoreApplication::addLibraryPath(pluginPath);
+ if (QWaylandClientBufferIntegration *ret = qLoadPlugin1<QWaylandClientBufferIntegration, QWaylandClientBufferIntegrationPlugin>(directLoader(), name, args))
+ return ret;
+ }
+ if (QWaylandClientBufferIntegration *ret = qLoadPlugin1<QWaylandClientBufferIntegration, QWaylandClientBufferIntegrationPlugin>(loader(), name, args))
+ return ret;
+#endif
+ return 0;
+}
+
+QT_END_NAMESPACE
diff --git a/src/client/hardwareintegration/qwaylandclientbufferintegrationfactory.h b/src/client/hardwareintegration/qwaylandclientbufferintegrationfactory.h
new file mode 100644
index 000000000..12b2e8dbb
--- /dev/null
+++ b/src/client/hardwareintegration/qwaylandclientbufferintegrationfactory.h
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the QtGui module 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 QWAYLANDCLIENTBUFFERINTEGRATIONFACTORY_H
+#define QWAYLANDCLIENTBUFFERINTEGRATIONFACTORY_H
+
+#include <QtWaylandClient/qwaylandclientexport.h>
+#include <QtCore/QStringList>
+
+QT_BEGIN_NAMESPACE
+
+class QWaylandClientBufferIntegration;
+
+class Q_WAYLAND_CLIENT_EXPORT QWaylandClientBufferIntegrationFactory
+{
+public:
+ static QStringList keys(const QString &pluginPath = QString());
+ static QWaylandClientBufferIntegration *create(const QString &name, const QStringList &args, const QString &pluginPath = QString());
+};
+
+QT_END_NAMESPACE
+
+#endif // QWAYLANDCLIENTBUFFERINTEGRATIONFACTORY_H
diff --git a/src/plugins/platforms/qwayland-generic/qwaylandgenericplatformintegration.h b/src/client/hardwareintegration/qwaylandclientbufferintegrationplugin.cpp
index 0d742e93a..58bb26d19 100644
--- a/src/plugins/platforms/qwayland-generic/qwaylandgenericplatformintegration.h
+++ b/src/client/hardwareintegration/qwaylandclientbufferintegrationplugin.cpp
@@ -3,7 +3,7 @@
** 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.
+** This file is part of the QtGui module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -39,29 +39,17 @@
**
****************************************************************************/
-#ifndef QWAYLANDEGLPLATFORMINTEGRATION_H
-#define QWAYLANDEGLPLATFORMINTEGRATION_H
-
-#include <QtWaylandClient/qwaylandintegration.h>
+#include "qwaylandclientbufferintegrationplugin.h"
QT_BEGIN_NAMESPACE
-class QWaylandGenericPlatformIntegration : public QWaylandIntegration
+QWaylandClientBufferIntegrationPlugin::QWaylandClientBufferIntegrationPlugin(QObject *parent) :
+ QObject(parent)
{
-public:
- QWaylandGenericPlatformIntegration()
- : QWaylandIntegration()
- , m_gl_integration(0)
- {
- }
-
- QWaylandGLIntegration *glIntegration() const
- { return m_gl_integration; }
+}
-private:
- QWaylandGLIntegration *m_gl_integration;
-};
+QWaylandClientBufferIntegrationPlugin::~QWaylandClientBufferIntegrationPlugin()
+{
+}
QT_END_NAMESPACE
-
-#endif
diff --git a/src/client/hardwareintegration/qwaylandclientbufferintegrationplugin.h b/src/client/hardwareintegration/qwaylandclientbufferintegrationplugin.h
new file mode 100644
index 000000000..685844061
--- /dev/null
+++ b/src/client/hardwareintegration/qwaylandclientbufferintegrationplugin.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the QtGui module 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 QWAYLANDCLIENTBUFFERINTEGRATIONPLUGIN_H
+#define QWAYLANDCLIENTBUFFERINTEGRATIONPLUGIN_H
+
+#include <QtWaylandClient/qwaylandclientexport.h>
+
+#include <QtCore/qplugin.h>
+#include <QtCore/qfactoryinterface.h>
+#include <QtCore/QObject>
+
+QT_BEGIN_NAMESPACE
+
+class QWaylandClientBufferIntegration;
+
+#define QWaylandClientBufferIntegrationFactoryInterface_iid "org.qt-project.Qt.WaylandClient.QWaylandClientBufferIntegrationFactoryInterface.5.1"
+
+class Q_WAYLAND_CLIENT_EXPORT QWaylandClientBufferIntegrationPlugin : public QObject
+{
+ Q_OBJECT
+public:
+ explicit QWaylandClientBufferIntegrationPlugin(QObject *parent = 0);
+ ~QWaylandClientBufferIntegrationPlugin();
+
+ virtual QWaylandClientBufferIntegration *create(const QString &key, const QStringList &paramList) = 0;
+};
+
+QT_END_NAMESPACE
+
+#endif // QWAYLANDCLIENTBUFFERINTEGRATIONPLUGIN_H
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp
index 4bcf2f689..880c76df8 100644
--- a/src/client/qwaylanddisplay.cpp
+++ b/src/client/qwaylanddisplay.cpp
@@ -50,7 +50,7 @@
#include "qwaylandclipboard.h"
#include "qwaylanddatadevicemanager.h"
-#include "qwaylandglintegration.h"
+#include "qwaylandclientbufferintegration.h"
#include "qwaylandwindowmanagerintegration.h"
@@ -78,9 +78,9 @@ struct wl_surface *QWaylandDisplay::createSurface(void *handle)
return surface;
}
-QWaylandGLIntegration * QWaylandDisplay::glIntegration() const
+QWaylandClientBufferIntegration * QWaylandDisplay::clientBufferIntegration() const
{
- return mWaylandIntegration->glIntegration();
+ return mWaylandIntegration->clientBufferIntegration();
}
QWaylandWindowManagerIntegration *QWaylandDisplay::windowManagerIntegration() const
diff --git a/src/client/qwaylanddisplay.h b/src/client/qwaylanddisplay.h
index c58a45f5d..4e76de256 100644
--- a/src/client/qwaylanddisplay.h
+++ b/src/client/qwaylanddisplay.h
@@ -62,7 +62,7 @@ class QSocketNotifier;
class QWaylandBuffer;
class QPlatformScreen;
class QWaylandScreen;
-class QWaylandGLIntegration;
+class QWaylandClientBufferIntegration;
class QWaylandWindowManagerIntegration;
class QWaylandDataDeviceManager;
class QWaylandTouchExtension;
@@ -98,7 +98,7 @@ public:
struct wl_surface *createSurface(void *handle);
- QWaylandGLIntegration *glIntegration() const;
+ QWaylandClientBufferIntegration *clientBufferIntegration() const;
QWaylandWindowManagerIntegration *windowManagerIntegration() const;
diff --git a/src/client/qwaylandintegration.cpp b/src/client/qwaylandintegration.cpp
index af4c4f7d4..3c0c12e4f 100644
--- a/src/client/qwaylandintegration.cpp
+++ b/src/client/qwaylandintegration.cpp
@@ -65,9 +65,8 @@
#include <qpa/qplatformaccessibility.h>
#include <qpa/qplatforminputcontext.h>
-#ifdef QT_WAYLAND_GL_SUPPORT
-#include "qwaylandglintegration.h"
-#endif
+#include "qwaylandclientbufferintegration.h"
+#include "qwaylandclientbufferintegrationfactory.h"
QT_BEGIN_NAMESPACE
@@ -102,13 +101,15 @@ public:
};
QWaylandIntegration::QWaylandIntegration()
- : mFontDb(new QGenericUnixFontDatabase())
+ : mClientBufferIntegration(0)
+ , mFontDb(new QGenericUnixFontDatabase())
, mNativeInterface(new QWaylandNativeInterface(this))
#ifndef QT_NO_ACCESSIBILITY
, mAccessibility(new QPlatformAccessibility())
#else
, mAccessibility(0)
#endif
+ , mClientBufferIntegrationInitialized(false)
{
mDisplay = new QWaylandDisplay(this);
mClipboard = new QWaylandClipboard(mDisplay);
@@ -141,9 +142,9 @@ bool QWaylandIntegration::hasCapability(QPlatformIntegration::Capability cap) co
switch (cap) {
case ThreadedPixmaps: return true;
case OpenGL:
- return mDisplay->glIntegration();
+ return mDisplay->clientBufferIntegration();
case ThreadedOpenGL:
- return mDisplay->glIntegration() && mDisplay->glIntegration()->supportsThreadedOpenGL();
+ return mDisplay->clientBufferIntegration() && mDisplay->clientBufferIntegration()->supportsThreadedOpenGL();
case BufferQueueingOpenGL:
return true;
case MultipleWindows:
@@ -155,15 +156,15 @@ bool QWaylandIntegration::hasCapability(QPlatformIntegration::Capability cap) co
QPlatformWindow *QWaylandIntegration::createPlatformWindow(QWindow *window) const
{
- if (window->surfaceType() == QWindow::OpenGLSurface && mDisplay->glIntegration())
- return mDisplay->glIntegration()->createEglWindow(window);
+ if (window->surfaceType() == QWindow::OpenGLSurface && mDisplay->clientBufferIntegration())
+ return mDisplay->clientBufferIntegration()->createEglWindow(window);
return new QWaylandShmWindow(window);
}
QPlatformOpenGLContext *QWaylandIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const
{
- if (mDisplay->glIntegration())
- return mDisplay->glIntegration()->createPlatformOpenGLContext(context->format(), context->shareHandle());
+ if (mDisplay->clientBufferIntegration())
+ return mDisplay->clientBufferIntegration()->createPlatformOpenGLContext(context->format(), context->shareHandle());
return 0;
}
@@ -236,9 +237,27 @@ QPlatformTheme *QWaylandIntegration::createPlatformTheme(const QString &name) co
return GenericWaylandTheme::createUnixTheme(name);
}
-QWaylandGLIntegration *QWaylandIntegration::glIntegration() const
+QWaylandClientBufferIntegration *QWaylandIntegration::clientBufferIntegration() const
{
- return 0;
+ if (!mClientBufferIntegrationInitialized)
+ const_cast<QWaylandIntegration *>(this)->initializeBufferIntegration();
+
+ return mClientBufferIntegration;
+}
+
+void QWaylandIntegration::initializeBufferIntegration()
+{
+ mClientBufferIntegrationInitialized = true;
+
+ QByteArray clientBufferIntegrationName = qgetenv("QT_WAYLAND_CLIENT_BUFFER_INTEGRATION");
+ if (clientBufferIntegrationName.isEmpty())
+ clientBufferIntegrationName = QByteArrayLiteral("wayland-egl");
+
+ QStringList keys = QWaylandClientBufferIntegrationFactory::keys();
+ QString targetKey = QString::fromLocal8Bit(clientBufferIntegrationName);
+ if (keys.contains(targetKey)) {
+ mClientBufferIntegration = QWaylandClientBufferIntegrationFactory::create(targetKey, QStringList());
+ }
}
QT_END_NAMESPACE
diff --git a/src/client/qwaylandintegration.h b/src/client/qwaylandintegration.h
index ebda9b284..bbc3c928a 100644
--- a/src/client/qwaylandintegration.h
+++ b/src/client/qwaylandintegration.h
@@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE
class QWaylandBuffer;
class QWaylandDisplay;
-class QWaylandGLIntegration;
+class QWaylandClientBufferIntegration;
class Q_WAYLAND_CLIENT_EXPORT QWaylandIntegration : public QPlatformIntegration
{
@@ -87,8 +87,11 @@ public:
QPlatformTheme *createPlatformTheme(const QString &name) const;
- virtual QWaylandGLIntegration *glIntegration() const;
+ virtual QWaylandClientBufferIntegration *clientBufferIntegration() const;
+protected:
+ QWaylandClientBufferIntegration *mClientBufferIntegration;
private:
+ void initializeBufferIntegration();
QPlatformFontDatabase *mFontDb;
QPlatformClipboard *mClipboard;
QPlatformDrag *mDrag;
@@ -96,6 +99,7 @@ private:
QPlatformNativeInterface *mNativeInterface;
QScopedPointer<QPlatformInputContext> mInputContext;
QPlatformAccessibility *mAccessibility;
+ bool mClientBufferIntegrationInitialized;
};
QT_END_NAMESPACE
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglintegration.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp
index 17ad89dde..372957f8a 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandeglintegration.cpp
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp
@@ -39,9 +39,7 @@
**
****************************************************************************/
-#include "qwaylandeglintegration.h"
-
-#include <QtWaylandClient/qwaylandglintegration.h>
+#include "qwaylandeglclientbufferintegration.h"
#include "qwaylandeglwindow.h"
#include "qwaylandglcontext.h"
@@ -57,7 +55,7 @@ static const char *qwaylandegl_threadedgl_blacklist_vendor[] = {
0
};
-QWaylandEglIntegration::QWaylandEglIntegration(QWaylandDisplay *display)
+QWaylandEglClientBufferIntegration::QWaylandEglClientBufferIntegration(QWaylandDisplay *display)
: m_waylandDisplay(display->wl_display())
, m_supportsThreading(false)
{
@@ -65,12 +63,12 @@ QWaylandEglIntegration::QWaylandEglIntegration(QWaylandDisplay *display)
}
-QWaylandEglIntegration::~QWaylandEglIntegration()
+QWaylandEglClientBufferIntegration::~QWaylandEglClientBufferIntegration()
{
eglTerminate(m_eglDisplay);
}
-void QWaylandEglIntegration::initialize()
+void QWaylandEglClientBufferIntegration::initialize()
{
QByteArray eglPlatform = qgetenv("EGL_PLATFORM");
if (eglPlatform.isEmpty()) {
@@ -101,22 +99,22 @@ void QWaylandEglIntegration::initialize()
}
}
-bool QWaylandEglIntegration::supportsThreadedOpenGL() const
+bool QWaylandEglClientBufferIntegration::supportsThreadedOpenGL() const
{
return m_supportsThreading;
}
-QWaylandWindow *QWaylandEglIntegration::createEglWindow(QWindow *window)
+QWaylandWindow *QWaylandEglClientBufferIntegration::createEglWindow(QWindow *window)
{
return new QWaylandEglWindow(window);
}
-QPlatformOpenGLContext *QWaylandEglIntegration::createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const
+QPlatformOpenGLContext *QWaylandEglClientBufferIntegration::createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const
{
return new QWaylandGLContext(m_eglDisplay, glFormat, share);
}
-EGLDisplay QWaylandEglIntegration::eglDisplay() const
+EGLDisplay QWaylandEglClientBufferIntegration::eglDisplay() const
{
return m_eglDisplay;
}
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglintegration.h b/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.h
index 4e14f354a..15964c999 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandeglintegration.h
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.h
@@ -42,7 +42,7 @@
#ifndef QWAYLANDEGLINTEGRATION_H
#define QWAYLANDEGLINTEGRATION_H
-#include <QtWaylandClient/qwaylandglintegration.h>
+#include <QtWaylandClient/qwaylandclientbufferintegration.h>
#include "qwaylandeglinclude.h"
@@ -51,11 +51,11 @@ QT_BEGIN_NAMESPACE
class QWaylandWindow;
class QWindow;
-class QWaylandEglIntegration : public QWaylandGLIntegration
+class QWaylandEglClientBufferIntegration : public QWaylandClientBufferIntegration
{
public:
- QWaylandEglIntegration(QWaylandDisplay *display);
- ~QWaylandEglIntegration();
+ QWaylandEglClientBufferIntegration(QWaylandDisplay *display);
+ ~QWaylandEglClientBufferIntegration();
void initialize();
bool supportsThreadedOpenGL() const;
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
index 0bcaf0e23..5be78b5db 100644
--- a/src/hardwareintegration/client/wayland-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->glIntegration()))
+ , m_clientBufferIntegration(static_cast<QWaylandEglClientBufferIntegration *>(mDisplay->clientBufferIntegration()))
, m_waylandEglWindow(0)
, m_eglSurface(0)
, m_eglConfig(0)
@@ -70,7 +70,7 @@ QWaylandEglWindow::QWaylandEglWindow(QWindow *window)
QWaylandEglWindow::~QWaylandEglWindow()
{
if (m_eglSurface) {
- eglDestroySurface(m_eglIntegration->eglDisplay(), m_eglSurface);
+ eglDestroySurface(m_clientBufferIntegration->eglDisplay(), m_eglSurface);
m_eglSurface = 0;
}
@@ -129,11 +129,11 @@ EGLSurface QWaylandEglWindow::eglSurface() const
}
if (!m_eglSurface) {
- m_eglConfig = q_configFromGLFormat(m_eglIntegration->eglDisplay(), window()->format(), true);
- const_cast<QWaylandEglWindow *>(this)->m_format = q_glFormatFromConfig(m_eglIntegration->eglDisplay(),m_eglConfig);
+ m_eglConfig = q_configFromGLFormat(m_clientBufferIntegration->eglDisplay(), window()->format(), true);
+ const_cast<QWaylandEglWindow *>(this)->m_format = q_glFormatFromConfig(m_clientBufferIntegration->eglDisplay(),m_eglConfig);
EGLNativeWindowType window = (EGLNativeWindowType) m_waylandEglWindow;
- m_eglSurface = eglCreateWindowSurface(m_eglIntegration->eglDisplay(), m_eglConfig, window, 0);
+ m_eglSurface = eglCreateWindowSurface(m_clientBufferIntegration->eglDisplay(), m_eglConfig, window, 0);
}
return m_eglSurface;
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.h b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.h
index b20e2ad01..06ba1b0b0 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.h
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.h
@@ -44,7 +44,7 @@
#include <QtWaylandClient/qwaylandwindow.h>
#include "qwaylandeglinclude.h"
-#include "qwaylandeglintegration.h"
+#include "qwaylandeglclientbufferintegration.h"
QT_BEGIN_NAMESPACE
@@ -70,7 +70,7 @@ public:
void bindContentFBO();
private:
- QWaylandEglIntegration *m_eglIntegration;
+ QWaylandEglClientBufferIntegration *m_clientBufferIntegration;
mutable struct wl_egl_window *m_waylandEglWindow;
const QWaylandWindow *m_parentWindow;
diff --git a/src/hardwareintegration/client/wayland-egl/wayland-egl.pri b/src/hardwareintegration/client/wayland-egl/wayland-egl.pri
index 906520666..bf03a8c72 100644
--- a/src/hardwareintegration/client/wayland-egl/wayland-egl.pri
+++ b/src/hardwareintegration/client/wayland-egl/wayland-egl.pri
@@ -6,11 +6,11 @@ INCLUDEPATH += $$PWD
LIBS += -lwayland-egl -lEGL
}
-SOURCES += $$PWD/qwaylandeglintegration.cpp \
+SOURCES += $$PWD/qwaylandeglclientbufferintegration.cpp \
$$PWD/qwaylandglcontext.cpp \
$$PWD/qwaylandeglwindow.cpp
-HEADERS += $$PWD/qwaylandeglintegration.h \
+HEADERS += $$PWD/qwaylandeglclientbufferintegration.h \
$$PWD/qwaylandglcontext.h \
$$PWD/qwaylandeglwindow.h \
$$PWD/qwaylandeglinclude.h
diff --git a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglintegration.cpp b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglclientbufferintegration.cpp
index ae644e944..ed60e9bb6 100644
--- a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglintegration.cpp
+++ b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglclientbufferintegration.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include "qwaylandxcompositeeglintegration.h"
+#include "qwaylandxcompositeeglclientbufferintegration.h"
#include "qwaylandxcompositeeglwindow.h"
@@ -49,81 +49,81 @@
QT_BEGIN_NAMESPACE
-QWaylandXCompositeEGLIntegration::QWaylandXCompositeEGLIntegration(QWaylandDisplay * waylandDisplay)
- : QWaylandGLIntegration()
+QWaylandXCompositeEGLClientBufferIntegration::QWaylandXCompositeEGLClientBufferIntegration(QWaylandDisplay * waylandDisplay)
+ : QWaylandClientBufferIntegration()
, mWaylandDisplay(waylandDisplay)
{
qDebug() << "Using XComposite-EGL";
waylandDisplay->addRegistryListener(&wlDisplayHandleGlobal, this);
}
-QWaylandXCompositeEGLIntegration::~QWaylandXCompositeEGLIntegration()
+QWaylandXCompositeEGLClientBufferIntegration::~QWaylandXCompositeEGLClientBufferIntegration()
{
XCloseDisplay(mDisplay);
}
-void QWaylandXCompositeEGLIntegration::initialize()
+void QWaylandXCompositeEGLClientBufferIntegration::initialize()
{
}
-QWaylandWindow * QWaylandXCompositeEGLIntegration::createEglWindow(QWindow *window)
+QWaylandWindow * QWaylandXCompositeEGLClientBufferIntegration::createEglWindow(QWindow *window)
{
return new QWaylandXCompositeEGLWindow(window,this);
}
-QPlatformOpenGLContext *QWaylandXCompositeEGLIntegration::createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const
+QPlatformOpenGLContext *QWaylandXCompositeEGLClientBufferIntegration::createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const
{
return new QWaylandXCompositeEGLContext(glFormat, share, eglDisplay());
}
-Display * QWaylandXCompositeEGLIntegration::xDisplay() const
+Display * QWaylandXCompositeEGLClientBufferIntegration::xDisplay() const
{
return mDisplay;
}
-EGLDisplay QWaylandXCompositeEGLIntegration::eglDisplay() const
+EGLDisplay QWaylandXCompositeEGLClientBufferIntegration::eglDisplay() const
{
return mEglDisplay;
}
-int QWaylandXCompositeEGLIntegration::screen() const
+int QWaylandXCompositeEGLClientBufferIntegration::screen() const
{
return mScreen;
}
-Window QWaylandXCompositeEGLIntegration::rootWindow() const
+Window QWaylandXCompositeEGLClientBufferIntegration::rootWindow() const
{
return mRootWindow;
}
-QWaylandDisplay * QWaylandXCompositeEGLIntegration::waylandDisplay() const
+QWaylandDisplay * QWaylandXCompositeEGLClientBufferIntegration::waylandDisplay() const
{
return mWaylandDisplay;
}
-qt_xcomposite * QWaylandXCompositeEGLIntegration::waylandXComposite() const
+qt_xcomposite * QWaylandXCompositeEGLClientBufferIntegration::waylandXComposite() const
{
return mWaylandComposite;
}
-const struct qt_xcomposite_listener QWaylandXCompositeEGLIntegration::xcomposite_listener = {
- QWaylandXCompositeEGLIntegration::rootInformation
+const struct qt_xcomposite_listener QWaylandXCompositeEGLClientBufferIntegration::xcomposite_listener = {
+ QWaylandXCompositeEGLClientBufferIntegration::rootInformation
};
-void QWaylandXCompositeEGLIntegration::wlDisplayHandleGlobal(void *data, wl_registry *registry, uint32_t id, const QString &interface, uint32_t version)
+void QWaylandXCompositeEGLClientBufferIntegration::wlDisplayHandleGlobal(void *data, wl_registry *registry, uint32_t id, const QString &interface, uint32_t version)
{
Q_UNUSED(version);
if (interface == "qt_xcomposite") {
- QWaylandXCompositeEGLIntegration *integration = static_cast<QWaylandXCompositeEGLIntegration *>(data);
+ QWaylandXCompositeEGLClientBufferIntegration *integration = static_cast<QWaylandXCompositeEGLClientBufferIntegration *>(data);
integration->mWaylandComposite = static_cast<struct qt_xcomposite *>(wl_registry_bind(registry,id,&qt_xcomposite_interface,1));
qt_xcomposite_add_listener(integration->mWaylandComposite,&xcomposite_listener,integration);
}
}
-void QWaylandXCompositeEGLIntegration::rootInformation(void *data, qt_xcomposite *xcomposite, const char *display_name, uint32_t root_window)
+void QWaylandXCompositeEGLClientBufferIntegration::rootInformation(void *data, qt_xcomposite *xcomposite, const char *display_name, uint32_t root_window)
{
Q_UNUSED(xcomposite);
- QWaylandXCompositeEGLIntegration *integration = static_cast<QWaylandXCompositeEGLIntegration *>(data);
+ QWaylandXCompositeEGLClientBufferIntegration *integration = static_cast<QWaylandXCompositeEGLClientBufferIntegration *>(data);
integration->mDisplay = XOpenDisplay(display_name);
integration->mRootWindow = (Window) root_window;
diff --git a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglintegration.h b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglclientbufferintegration.h
index 1c165d817..0a8cc0f6c 100644
--- a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglintegration.h
+++ b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglclientbufferintegration.h
@@ -39,10 +39,10 @@
**
****************************************************************************/
-#ifndef QWAYLANDXCOMPOSITEEGLINTEGRATION_H
-#define QWAYLANDXCOMPOSITEEGLINTEGRATION_H
+#ifndef QWAYLANDXCOMPOSITEEGLCLIENTBUFFERINTEGRATION_H
+#define QWAYLANDXCOMPOSITEEGLCLIENTBUFFERINTEGRATION_H
-#include <QtWaylandClient/qwaylandglintegration.h>
+#include <QtWaylandClient/qwaylandclientbufferintegration.h>
#include "wayland-client.h"
#include <QtCore/QTextStream>
@@ -68,11 +68,11 @@ struct qt_xcomposite;
QT_BEGIN_NAMESPACE
-class QWaylandXCompositeEGLIntegration : public QWaylandGLIntegration
+class QWaylandXCompositeEGLClientBufferIntegration : public QWaylandClientBufferIntegration
{
public:
- QWaylandXCompositeEGLIntegration(QWaylandDisplay * waylandDispaly);
- ~QWaylandXCompositeEGLIntegration();
+ QWaylandXCompositeEGLClientBufferIntegration(QWaylandDisplay * waylandDispaly);
+ ~QWaylandXCompositeEGLClientBufferIntegration();
void initialize();
bool waitingForEvents() { return !mDisplay; }
@@ -111,4 +111,4 @@ private:
QT_END_NAMESPACE
-#endif // QWAYLANDXCOMPOSITEEGLINTEGRATION_H
+#endif // QWAYLANDXCOMPOSITEEGLCLIENTBUFFERINTEGRATION_H
diff --git a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglcontext.h b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglcontext.h
index 32cdb4322..bc988480d 100644
--- a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglcontext.h
+++ b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglcontext.h
@@ -44,7 +44,7 @@
#include <qpa/qplatformopenglcontext.h>
-#include "qwaylandxcompositeeglintegration.h"
+#include "qwaylandxcompositeeglclientbufferintegration.h"
#include <QtPlatformSupport/private/qeglplatformcontext_p.h>
diff --git a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.cpp b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.cpp
index f0df2bd2d..3d19dbe3f 100644
--- a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.cpp
+++ b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.cpp
@@ -48,13 +48,13 @@
#include "wayland-xcomposite-client-protocol.h"
#include <X11/extensions/Xcomposite.h>
-#include "qwaylandxcompositeeglintegration.h"
+#include "qwaylandxcompositeeglclientbufferintegration.h"
#include <QtCore/QDebug>
QT_BEGIN_NAMESPACE
-QWaylandXCompositeEGLWindow::QWaylandXCompositeEGLWindow(QWindow *window, QWaylandXCompositeEGLIntegration *glxIntegration)
+QWaylandXCompositeEGLWindow::QWaylandXCompositeEGLWindow(QWindow *window, QWaylandXCompositeEGLClientBufferIntegration *glxIntegration)
: QWaylandWindow(window)
, m_glxIntegration(glxIntegration)
, m_context(0)
diff --git a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.h b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.h
index bd37ee7cf..9e512ec7c 100644
--- a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.h
+++ b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.h
@@ -45,7 +45,7 @@
#include <QtWaylandClient/qwaylandwindow.h>
#include <QtWaylandClient/qwaylandbuffer.h>
-#include "qwaylandxcompositeeglintegration.h"
+#include "qwaylandxcompositeeglclientbufferintegration.h"
#include "qwaylandxcompositeeglcontext.h"
QT_BEGIN_NAMESPACE
@@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
class QWaylandXCompositeEGLWindow : public QWaylandWindow
{
public:
- QWaylandXCompositeEGLWindow(QWindow *window, QWaylandXCompositeEGLIntegration *glxIntegration);
+ QWaylandXCompositeEGLWindow(QWindow *window, QWaylandXCompositeEGLClientBufferIntegration *glxIntegration);
WindowType windowType() const;
void setGeometry(const QRect &rect);
@@ -63,7 +63,7 @@ public:
private:
void createEglSurface();
- QWaylandXCompositeEGLIntegration *m_glxIntegration;
+ QWaylandXCompositeEGLClientBufferIntegration *m_glxIntegration;
QWaylandXCompositeEGLContext *m_context;
QWaylandBuffer *m_buffer;
diff --git a/src/hardwareintegration/client/xcomposite-egl/xcomposite-egl.pri b/src/hardwareintegration/client/xcomposite-egl/xcomposite-egl.pri
index fc34575f5..fa08daaf2 100644
--- a/src/hardwareintegration/client/xcomposite-egl/xcomposite-egl.pri
+++ b/src/hardwareintegration/client/xcomposite-egl/xcomposite-egl.pri
@@ -10,10 +10,10 @@ include($$PWD/../xcomposite_share/xcomposite_share.pri)
SOURCES += \
$$PWD/qwaylandxcompositeeglcontext.cpp \
- $$PWD/qwaylandxcompositeeglintegration.cpp \
+ $$PWD/qwaylandxcompositeeglclientbufferintegration.cpp \
$$PWD/qwaylandxcompositeeglwindow.cpp
HEADERS += \
$$PWD/qwaylandxcompositeeglcontext.h \
- $$PWD/qwaylandxcompositeeglintegration.h \
+ $$PWD/qwaylandxcompositeeglclientbufferintegration.h \
$$PWD/qwaylandxcompositeeglwindow.h
diff --git a/src/plugins/platforms/qwayland-egl/qwaylandeglplatformintegration.h b/src/plugins/platforms/qwayland-egl/qwaylandeglplatformintegration.h
index c9c288feb..a6c572466 100644
--- a/src/plugins/platforms/qwayland-egl/qwaylandeglplatformintegration.h
+++ b/src/plugins/platforms/qwayland-egl/qwaylandeglplatformintegration.h
@@ -44,7 +44,7 @@
#include <QtWaylandClient/qwaylandintegration.h>
-#include "qwaylandeglintegration.h"
+#include "qwaylandeglclientbufferintegration.h"
QT_BEGIN_NAMESPACE
@@ -53,16 +53,16 @@ class QWaylandEglPlatformIntegration : public QWaylandIntegration
public:
QWaylandEglPlatformIntegration()
: QWaylandIntegration()
- , m_gl_integration(new QWaylandEglIntegration(display()))
+ , m_client_buffer_integration(new QWaylandEglClientBufferIntegration(display()))
{
- m_gl_integration->initialize();
+ m_client_buffer_integration->initialize();
}
- QWaylandGLIntegration *glIntegration() const
- { return m_gl_integration; }
+ QWaylandEglClientBufferIntegration *clientBufferIntegration() const
+ { return m_client_buffer_integration; }
private:
- QWaylandGLIntegration *m_gl_integration;
+ QWaylandEglClientBufferIntegration *m_client_buffer_integration;
};
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/qwayland-generic/main.cpp b/src/plugins/platforms/qwayland-generic/main.cpp
index 15a7a9f52..1b4028cd0 100644
--- a/src/plugins/platforms/qwayland-generic/main.cpp
+++ b/src/plugins/platforms/qwayland-generic/main.cpp
@@ -40,7 +40,7 @@
****************************************************************************/
#include <qpa/qplatformintegrationplugin.h>
-#include "qwaylandgenericplatformintegration.h"
+#include <QtWaylandClient/qwaylandintegration.h>
QT_BEGIN_NAMESPACE
@@ -64,7 +64,7 @@ QPlatformIntegration *QWaylandIntegrationPlugin::create(const QString& system, c
{
Q_UNUSED(paramList);
if (system.toLower() == "wayland")
- return new QWaylandGenericPlatformIntegration();
+ return new QWaylandIntegration();
return 0;
}
diff --git a/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglplatformintegration.h b/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglplatformintegration.h
index 0bcd128da..528a7d054 100644
--- a/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglplatformintegration.h
+++ b/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglplatformintegration.h
@@ -44,7 +44,7 @@
#include <QtWaylandClient/qwaylandintegration.h>
-#include "qwaylandxcompositeeglintegration.h"
+#include "qwaylandxcompositeeglclientbufferintegration.h"
QT_BEGIN_NAMESPACE
@@ -53,14 +53,14 @@ class QWaylandXCompositeEglPlatformIntegration : public QWaylandIntegration
public:
QWaylandXCompositeEglPlatformIntegration()
: QWaylandIntegration()
- , m_gl_integration(new QWaylandXCompositeEGLIntegration(display()))
+ , m_client_buffer_integration(new QWaylandXCompositeEGLClientBufferIntegration(display()))
{ }
- QWaylandGLIntegration *glIntegration() const Q_DECL_OVERRIDE
- { return m_gl_integration; }
+ QWaylandClientBufferIntegration *clientBufferIntegration() const Q_DECL_OVERRIDE
+ { return m_client_buffer_integration; }
private:
- QWaylandGLIntegration *m_gl_integration;
+ QWaylandClientBufferIntegration *m_client_buffer_integration;
};
QT_END_NAMESPACE