summaryrefslogtreecommitdiffstats
path: root/src/plugins/hardwareintegration/client
diff options
context:
space:
mode:
authorJorgen Lind <jorgen.lind@digia.com>2013-12-17 16:26:39 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-27 22:58:07 +0100
commit79c2b1cb237798f162b039723bc552b30aeee604 (patch)
treec166a7b64d45a0a82c84dcaf5a56dbe4b8b91ee6 /src/plugins/hardwareintegration/client
parent28b3a4d7bac4219442140a0d4a6df58db9d5eb75 (diff)
Add drm-egl server buffer integration
Change-Id: Ib72cb43e78c068ebafa8c4e8ef1576746c7015e8 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
Diffstat (limited to 'src/plugins/hardwareintegration/client')
-rw-r--r--src/plugins/hardwareintegration/client/client.pro4
-rw-r--r--src/plugins/hardwareintegration/client/drm-egl-server/drm-egl-server.json3
-rw-r--r--src/plugins/hardwareintegration/client/drm-egl-server/drm-egl-server.pro14
-rw-r--r--src/plugins/hardwareintegration/client/drm-egl-server/main.cpp74
4 files changed, 95 insertions, 0 deletions
diff --git a/src/plugins/hardwareintegration/client/client.pro b/src/plugins/hardwareintegration/client/client.pro
index 8c8f74bf6..0b1191919 100644
--- a/src/plugins/hardwareintegration/client/client.pro
+++ b/src/plugins/hardwareintegration/client/client.pro
@@ -13,3 +13,7 @@ config_xcomposite {
!contains(QT_CONFIG, opengles2):config_glx: \
SUBDIRS += xcomposite-glx
}
+
+# we should try and resolve all symbols
+# and they should be type deffed if not present
+SUBDIRS += drm-egl-server
diff --git a/src/plugins/hardwareintegration/client/drm-egl-server/drm-egl-server.json b/src/plugins/hardwareintegration/client/drm-egl-server/drm-egl-server.json
new file mode 100644
index 000000000..e2266ec60
--- /dev/null
+++ b/src/plugins/hardwareintegration/client/drm-egl-server/drm-egl-server.json
@@ -0,0 +1,3 @@
+{
+ "Keys": [ "drm-egl-server" ]
+}
diff --git a/src/plugins/hardwareintegration/client/drm-egl-server/drm-egl-server.pro b/src/plugins/hardwareintegration/client/drm-egl-server/drm-egl-server.pro
new file mode 100644
index 000000000..d282afc81
--- /dev/null
+++ b/src/plugins/hardwareintegration/client/drm-egl-server/drm-egl-server.pro
@@ -0,0 +1,14 @@
+PLUGIN_TYPE = wayland-graphics-integration/client
+load(qt_plugin)
+
+QT += waylandclient-private
+
+include(../../../../hardwareintegration/client/drm-egl-server/drm-egl-server.pri)
+
+LIBS += -lEGL
+
+OTHER_FILES += \
+ drm-egl-server.json
+
+SOURCES += main.cpp
+
diff --git a/src/plugins/hardwareintegration/client/drm-egl-server/main.cpp b/src/plugins/hardwareintegration/client/drm-egl-server/main.cpp
new file mode 100644
index 000000000..33f484287
--- /dev/null
+++ b/src/plugins/hardwareintegration/client/drm-egl-server/main.cpp
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#include <QtWaylandClient/qwaylandserverbufferintegrationplugin.h>
+#include "drmeglserverbufferintegration.h"
+
+QT_BEGIN_NAMESPACE
+
+class DrmEglServerBufferPlugin : public QWaylandServerBufferIntegrationPlugin
+{
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.WaylandClient.QWaylandServerBufferIntegrationFactoryInterface.5.1" FILE "drm-egl-server.json")
+public:
+ QStringList keys() const;
+ QWaylandServerBufferIntegration *create(const QString&, const QStringList&);
+};
+
+QStringList DrmEglServerBufferPlugin::keys() const
+{
+ QStringList list;
+ list << "drm-egl-server";
+ return list;
+}
+
+QWaylandServerBufferIntegration *DrmEglServerBufferPlugin::create(const QString& system, const QStringList& paramList)
+{
+ Q_UNUSED(paramList);
+ if (system.toLower() == "drm-egl-server")
+ return new DrmEglServerBufferIntegration();
+
+ return 0;
+}
+
+QT_END_NAMESPACE
+
+#include "main.moc"