diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2017-05-22 16:44:56 +0200 |
---|---|---|
committer | Johan Helsing <johan.helsing@qt.io> | 2018-02-09 10:29:16 +0000 |
commit | 062e7bffc7a60ebe3bb95fc736aabbafbb01cf6b (patch) | |
tree | ab678cbd5c33b360b1ca36780d6f461af62bf789 /src/plugins/hardwareintegration | |
parent | 8b204b2c56be5e7c1fd21144ae140c9b865dd86b (diff) | |
download | qtwayland-062e7bffc7a60ebe3bb95fc736aabbafbb01cf6b.tar.gz |
Compositor API: Add support for hardware compositing
[ChangeLog][Compositor] Add a tech preview for a plugin-based hardware layer
API and a VSP2 implementation (for Renesas R-Car M3 and H3).
Task-number: QTBUG-64600
Task-number: QTBUG-64604
Change-Id: Ia4abfb6343cf4f006ba408d293ec9464cd6f31b7
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src/plugins/hardwareintegration')
5 files changed, 86 insertions, 0 deletions
diff --git a/src/plugins/hardwareintegration/compositor/compositor.pro b/src/plugins/hardwareintegration/compositor/compositor.pro index 0b2a4292..22301d07 100644 --- a/src/plugins/hardwareintegration/compositor/compositor.pro +++ b/src/plugins/hardwareintegration/compositor/compositor.pro @@ -16,3 +16,5 @@ qtConfig(libhybris-egl-server): \ ### TODO: make shm-emulation configurable SUBDIRS += shm-emulation-server + +SUBDIRS += hardwarelayer diff --git a/src/plugins/hardwareintegration/compositor/hardwarelayer/hardwarelayer.pro b/src/plugins/hardwareintegration/compositor/hardwarelayer/hardwarelayer.pro new file mode 100644 index 00000000..634447af --- /dev/null +++ b/src/plugins/hardwareintegration/compositor/hardwarelayer/hardwarelayer.pro @@ -0,0 +1,5 @@ +TEMPLATE = subdirs +QT_FOR_CONFIG += waylandcompositor-private + +qtConfig(wayland-layer-integration-vsp2): \ + SUBDIRS += vsp2 diff --git a/src/plugins/hardwareintegration/compositor/hardwarelayer/vsp2/main.cpp b/src/plugins/hardwareintegration/compositor/hardwarelayer/vsp2/main.cpp new file mode 100644 index 00000000..865637c5 --- /dev/null +++ b/src/plugins/hardwareintegration/compositor/hardwarelayer/vsp2/main.cpp @@ -0,0 +1,62 @@ +/**************************************************************************** +** +** Copyright (C) 2018 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** 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 The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/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 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtWaylandCompositor/private/qwlhardwarelayerintegrationplugin_p.h> +#include "vsp2hardwarelayerintegration.h" + +QT_BEGIN_NAMESPACE + +class Vsp2HardwareLayerIntegrationPlugin : public QtWayland::HardwareLayerIntegrationPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID QtWaylandHardwareLayerIntegrationFactoryInterface_iid FILE "vsp2.json") +public: + QtWayland::HardwareLayerIntegration *create(const QString&, const QStringList&) override; +}; + +QtWayland::HardwareLayerIntegration *Vsp2HardwareLayerIntegrationPlugin::create(const QString& system, const QStringList& paramList) +{ + Q_UNUSED(paramList); + Q_UNUSED(system); + return new Vsp2HardwareLayerIntegration(); +} + +QT_END_NAMESPACE + +#include "main.moc" diff --git a/src/plugins/hardwareintegration/compositor/hardwarelayer/vsp2/vsp2.json b/src/plugins/hardwareintegration/compositor/hardwarelayer/vsp2/vsp2.json new file mode 100644 index 00000000..1fc35bc5 --- /dev/null +++ b/src/plugins/hardwareintegration/compositor/hardwarelayer/vsp2/vsp2.json @@ -0,0 +1,3 @@ +{ + "Keys": [ "vsp2" ] +} diff --git a/src/plugins/hardwareintegration/compositor/hardwarelayer/vsp2/vsp2.pro b/src/plugins/hardwareintegration/compositor/hardwarelayer/vsp2/vsp2.pro new file mode 100644 index 00000000..ff16b20b --- /dev/null +++ b/src/plugins/hardwareintegration/compositor/hardwarelayer/vsp2/vsp2.pro @@ -0,0 +1,14 @@ +QT = waylandcompositor waylandcompositor-private core-private gui-private + +QMAKE_USE_PRIVATE += wayland-kms + +OTHER_FILES += vsp2.json + +SOURCES += \ + main.cpp + +include($PWD/../../../../../../hardwareintegration/compositor/hardwarelayer/vsp2/vsp2.pri) + +PLUGIN_TYPE = wayland-hardware-layer-integration +PLUGIN_CLASS_NAME = Vsp2HardwareLayerIntegrationPlugin +load(qt_plugin) |