diff options
author | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2015-03-02 16:09:22 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2015-03-05 09:51:16 +0000 |
commit | d04c3d2079e0df79592128a67e115ecb90b08454 (patch) | |
tree | c624d38e5d8da5603d6f7a7485cc9af9d51a4fd2 | |
parent | c6045db4a6a1faec0365d88ab0a34d481540e543 (diff) |
eglfs: Pluginize RPi, iMX6 and Mali backends
eglfs does not depend on the device makespecs anymore when it comes to these device
integration backends (hooks). Instead, backends are autodetected by configure.
The name of the preferred plugin is still set in the device makespecs. This
is optional. When not set and there is more than one plugin present in the system,
the environment variable QT_QPA_EGLFS_INTEGRATION will have to be set at runtime.
In the absence of that, the order is undefined.
Change-Id: Ie1ced2c9aa1beff2adb13b4fdea7c499cb5a6aab
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
29 files changed, 607 insertions, 94 deletions
diff --git a/config.tests/qpa/eglfs-brcm/eglfs-brcm.cpp b/config.tests/qpa/eglfs-brcm/eglfs-brcm.cpp new file mode 100644 index 0000000000..a97fb510c7 --- /dev/null +++ b/config.tests/qpa/eglfs-brcm/eglfs-brcm.cpp @@ -0,0 +1,45 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the config.tests of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** 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 http://www.qt.io/terms-conditions. For further +** information use the contact form at http://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 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <EGL/egl.h> +#include <GLES2/gl2.h> +#include <bcm_host.h> + +int main(int, char **) +{ + EGLDisplay dpy = 0; + EGLContext ctx = 0; + eglDestroyContext(dpy, ctx); + vc_dispmanx_display_open(0); + return 0; +} diff --git a/config.tests/qpa/eglfs-brcm/eglfs-brcm.pro b/config.tests/qpa/eglfs-brcm/eglfs-brcm.pro new file mode 100644 index 0000000000..623726c9f3 --- /dev/null +++ b/config.tests/qpa/eglfs-brcm/eglfs-brcm.pro @@ -0,0 +1,9 @@ +SOURCES = eglfs-brcm.cpp + +CONFIG -= qt + +INCLUDEPATH += $$[QT_SYSROOT]/opt/vc/include \ + $$[QT_SYSROOT]/opt/vc/include/interface/vcos/pthreads \ + $$[QT_SYSROOT]/opt/vc/include/interface/vmcs_host/linux + +LIBS += -L$$[QT_SYSROOT]/opt/vc/lib -lEGL -lGLESv2 -lbcm_host diff --git a/config.tests/qpa/eglfs-mali/eglfs-mali.cpp b/config.tests/qpa/eglfs-mali/eglfs-mali.cpp new file mode 100644 index 0000000000..8c1d33308d --- /dev/null +++ b/config.tests/qpa/eglfs-mali/eglfs-mali.cpp @@ -0,0 +1,45 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the config.tests of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** 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 http://www.qt.io/terms-conditions. For further +** information use the contact form at http://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 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <EGL/fbdev_window.h> +#include <EGL/egl.h> +#include <GLES2/gl2.h> + +int main(int, char **) +{ + EGLDisplay dpy = 0; + EGLContext ctx = 0; + fbdev_window *w = 0; + eglDestroyContext(dpy, ctx); + return 0; +} diff --git a/config.tests/qpa/eglfs-mali/eglfs-mali.pro b/config.tests/qpa/eglfs-mali/eglfs-mali.pro new file mode 100644 index 0000000000..132918c4bc --- /dev/null +++ b/config.tests/qpa/eglfs-mali/eglfs-mali.pro @@ -0,0 +1,5 @@ +SOURCES = eglfs-mali.cpp + +CONFIG -= qt + +LIBS += -lEGL -lGLESv2 diff --git a/config.tests/qpa/eglfs-viv/eglfs-viv.cpp b/config.tests/qpa/eglfs-viv/eglfs-viv.cpp new file mode 100644 index 0000000000..7b5b02541b --- /dev/null +++ b/config.tests/qpa/eglfs-viv/eglfs-viv.cpp @@ -0,0 +1,42 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the config.tests of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** 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 http://www.qt.io/terms-conditions. For further +** information use the contact form at http://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 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <EGL/egl.h> +#include <EGL/eglvivante.h> +#include <GLES2/gl2.h> + +int main(int, char **) +{ + fbGetDisplayByIndex(0); + return 0; +} diff --git a/config.tests/qpa/eglfs-viv/eglfs-viv.pro b/config.tests/qpa/eglfs-viv/eglfs-viv.pro new file mode 100644 index 0000000000..99776940ec --- /dev/null +++ b/config.tests/qpa/eglfs-viv/eglfs-viv.pro @@ -0,0 +1,6 @@ +SOURCES = eglfs-viv.cpp +DEFINES += LINUX=1 EGL_API_FB=1 + +CONFIG -= qt + +LIBS += -lEGL -lGLESv2 -lGAL @@ -5553,6 +5553,22 @@ fi if [ "$CFG_EGLFS" != "no" ]; then if [ "$XPLATFORM_QNX" = "no" ] && [ "$CFG_OPENGL" != "no" ]; then CFG_EGLFS="$CFG_EGL" + # Detect eglfs backends. + if compileTest qpa/eglfs-brcm "eglfs-brcm"; then + CFG_EGLFS_BRCM=yes + else + CFG_EGLFS_BRCM=no + fi + if compileTest qpa/eglfs-mali "eglfs-mali"; then + CFG_EGLFS_MALI=yes + else + CFG_EGLFS_MALI=no + fi + if compileTest qpa/eglfs-viv "eglfs-viv"; then + CFG_EGLFS_VIV=yes + else + CFG_EGLFS_VIV=no + fi else CFG_EGLFS="no" fi @@ -5964,6 +5980,16 @@ if [ "$CFG_EGLFS" = "yes" ]; then else QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGLFS" fi +# eglfs backends +if [ "$CFG_EGLFS_BRCM" = "yes" ]; then + QT_CONFIG="$QT_CONFIG eglfs_brcm" +fi +if [ "$CFG_EGLFS_MALI" = "yes" ]; then + QT_CONFIG="$QT_CONFIG eglfs_mali" +fi +if [ "$CFG_EGLFS_VIV" = "yes" ]; then + QT_CONFIG="$QT_CONFIG eglfs_viv" +fi # enable openvg if [ "$CFG_OPENVG" = "no" ]; then @@ -6998,7 +7024,11 @@ report_support " PulseAudio ............." "$CFG_PULSEAUDIO" report_support " QPA backends:" report_support " DirectFB ............." "$CFG_DIRECTFB" report_support " EGLFS ................" "$CFG_EGLFS" -report_support " KMS .................." "$CFG_KMS" +report_support " EGLFS i.MX6....... ." "$CFG_EGLFS_VIV" +report_support " EGLFS KMS .........." "$CFG_KMS" +report_support " EGLFS Mali ........." "$CFG_EGLFS_MALI" +report_support " EGLFS Raspberry Pi ." "$CFG_EGLFS_BRCM" +report_support " EGLFS X11 .........." "$CFG_EGL_X" report_support " LinuxFB .............." "$CFG_LINUXFB" report_support " XCB .................." "$CFG_XCB" system "system library" qt "bundled copy" if [ "$CFG_XCB" != "no" ]; then diff --git a/mkspecs/devices/linux-arm-hisilicon-hix5hd2-g++/qmake.conf b/mkspecs/devices/linux-arm-hisilicon-hix5hd2-g++/qmake.conf index 851d08600f..71ff90c9f8 100644 --- a/mkspecs/devices/linux-arm-hisilicon-hix5hd2-g++/qmake.conf +++ b/mkspecs/devices/linux-arm-hisilicon-hix5hd2-g++/qmake.conf @@ -18,7 +18,6 @@ # -prefix /home/abc/project/sysbase/qt_install include(../common/linux_device_pre.conf) -EGLFS_PLATFORM_HOOKS_SOURCES = $$PWD/qeglfshooks_hix5hd2.cpp QMAKE_INCDIR += /usr/arm-linux-gnueabihf/include QMAKE_LIBDIR += /usr/arm-linux-gnueabihf/lib @@ -39,6 +38,9 @@ DISTRO_OPTS += hard-float QMAKE_CFLAGS +=-march=armv7-a -mcpu=cortex-a9 -mfpu=vfpv3-d16 QMAKE_CXXFLAGS += $$QMAKE_CFLAGS +# Preferred eglfs backend +EGLFS_DEVICE_INTEGRATION = eglfs_mali + include(../common/linux_arm_device_post.conf) load(qt_config) diff --git a/mkspecs/devices/linux-imx6-g++/qmake.conf b/mkspecs/devices/linux-imx6-g++/qmake.conf index c8b6741e9a..1646c5fe77 100644 --- a/mkspecs/devices/linux-imx6-g++/qmake.conf +++ b/mkspecs/devices/linux-imx6-g++/qmake.conf @@ -4,8 +4,6 @@ include(../common/linux_device_pre.conf) -EGLFS_PLATFORM_HOOKS_SOURCES = $$PWD/qeglfshooks_imx6.cpp - QMAKE_INCDIR += $$[QT_SYSROOT]/usr/include QMAKE_LIBDIR += $$[QT_SYSROOT]/usr/lib @@ -21,6 +19,9 @@ QMAKE_CXXFLAGS += $$IMX6_CFLAGS DISTRO_OPTS += hard-float +# Preferred eglfs backend +EGLFS_DEVICE_INTEGRATION = eglfs_viv + include(../common/linux_arm_device_post.conf) load(qt_config) diff --git a/mkspecs/devices/linux-rasp-pi-g++/qmake.conf b/mkspecs/devices/linux-rasp-pi-g++/qmake.conf index 38e4b36cdd..20f8212f8f 100644 --- a/mkspecs/devices/linux-rasp-pi-g++/qmake.conf +++ b/mkspecs/devices/linux-rasp-pi-g++/qmake.conf @@ -36,8 +36,8 @@ QMAKE_CFLAGS += \ QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -EGLFS_PLATFORM_HOOKS_SOURCES = $$PWD/qeglfshooks_pi.cpp -EGLFS_PLATFORM_HOOKS_LIBS = -lbcm_host +# Preferred eglfs backend +EGLFS_DEVICE_INTEGRATION = eglfs_brcm include(../common/linux_arm_device_post.conf) diff --git a/mkspecs/devices/linux-rasp-pi2-g++/qmake.conf b/mkspecs/devices/linux-rasp-pi2-g++/qmake.conf index bf6749534d..9be3f401ce 100644 --- a/mkspecs/devices/linux-rasp-pi2-g++/qmake.conf +++ b/mkspecs/devices/linux-rasp-pi2-g++/qmake.conf @@ -18,8 +18,8 @@ QMAKE_CXXFLAGS = $$QMAKE_CFLAGS DISTRO_OPTS += hard-float -EGLFS_PLATFORM_HOOKS_SOURCES = $$PWD/../linux-rasp-pi-g++/qeglfshooks_pi.cpp -EGLFS_PLATFORM_HOOKS_LIBS = -lbcm_host +# Preferred eglfs backend +EGLFS_DEVICE_INTEGRATION = eglfs_brcm include(../common/linux_arm_device_post.conf) diff --git a/src/plugins/platforms/eglfs/deviceintegration/deviceintegration.pro b/src/plugins/platforms/eglfs/deviceintegration/deviceintegration.pro index d8ce385636..0adbb0d49f 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/deviceintegration.pro +++ b/src/plugins/platforms/eglfs/deviceintegration/deviceintegration.pro @@ -2,3 +2,6 @@ TEMPLATE = subdirs contains(QT_CONFIG, egl_x11): SUBDIRS += eglfs_x11 contains(QT_CONFIG, kms): SUBDIRS += eglfs_kms +contains(QT_CONFIG, eglfs_brcm): SUBDIRS += eglfs_brcm +contains(QT_CONFIG, eglfs_mali): SUBDIRS += eglfs_mali +contains(QT_CONFIG, eglfs_viv): SUBDIRS += eglfs_viv diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm/eglfs_brcm.json b/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm/eglfs_brcm.json new file mode 100644 index 0000000000..5f29d7dd0e --- /dev/null +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm/eglfs_brcm.json @@ -0,0 +1,3 @@ +{ + "Keys": [ "eglfs_brcm" ] +} diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm/eglfs_brcm.pro b/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm/eglfs_brcm.pro new file mode 100644 index 0000000000..98797e2106 --- /dev/null +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm/eglfs_brcm.pro @@ -0,0 +1,20 @@ +TARGET = qeglfs-brcm-integration + +PLUGIN_TYPE = egldeviceintegrations +PLUGIN_CLASS_NAME = QEglFSBrcmIntegrationPlugin +load(qt_plugin) + +QT += core-private gui-private platformsupport-private eglfs_device_lib-private + +INCLUDEPATH += $$PWD/../.. +CONFIG += egl + +LIBS += -lbcm_host +QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF + +SOURCES += $$PWD/qeglfsbrcmmain.cpp \ + $$PWD/qeglfsbrcmintegration.cpp + +HEADERS += $$PWD/qeglfsbrcmintegration.h + +OTHER_FILES += $$PWD/eglfs_brcm.json diff --git a/mkspecs/devices/linux-rasp-pi-g++/qeglfshooks_pi.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm/qeglfsbrcmintegration.cpp index 64a9617c48..4813d9be04 100644 --- a/mkspecs/devices/linux-rasp-pi-g++/qeglfshooks_pi.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm/qeglfsbrcmintegration.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2015 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** -** This file is part of the qmake spec of the Qt Toolkit. +** This file is part of the plugins of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL21$ ** Commercial License Usage @@ -31,13 +31,7 @@ ** ****************************************************************************/ -#include "qeglfshooks.h" - -#include <QtDebug> - -#include <QtPlatformSupport/private/qeglconvenience_p.h> -#include <QtPlatformSupport/private/qeglplatformcontext_p.h> - +#include "qeglfsbrcmintegration.h" #include <bcm_host.h> QT_BEGIN_NAMESPACE @@ -88,54 +82,41 @@ static void destroyDispmanxLayer(EGLNativeWindowType window) delete eglWindow; } -class QEglFSPiHooks : public QEglFSHooks -{ -public: - virtual void platformInit(); - virtual void platformDestroy(); - virtual EGLNativeDisplayType platformDisplay() const; - virtual QSize screenSize() const; - virtual EGLNativeWindowType createNativeWindow(QPlatformWindow *window, const QSize &size, const QSurfaceFormat &format); - virtual void destroyNativeWindow(EGLNativeWindowType window); - virtual bool hasCapability(QPlatformIntegration::Capability cap) const; - -}; - -void QEglFSPiHooks::platformInit() +void QEglFSBrcmIntegration::platformInit() { bcm_host_init(); } -EGLNativeDisplayType QEglFSPiHooks::platformDisplay() const +EGLNativeDisplayType QEglFSBrcmIntegration::platformDisplay() const { dispman_display = vc_dispmanx_display_open(0/* LCD */); return EGL_DEFAULT_DISPLAY; } -void QEglFSPiHooks::platformDestroy() +void QEglFSBrcmIntegration::platformDestroy() { vc_dispmanx_display_close(dispman_display); } -QSize QEglFSPiHooks::screenSize() const +QSize QEglFSBrcmIntegration::screenSize() const { uint32_t width, height; graphics_get_display_size(0 /* LCD */, &width, &height); return QSize(width, height); } -EGLNativeWindowType QEglFSPiHooks::createNativeWindow(QPlatformWindow *window, const QSize &size, const QSurfaceFormat &format) +EGLNativeWindowType QEglFSBrcmIntegration::createNativeWindow(QPlatformWindow *window, const QSize &size, const QSurfaceFormat &format) { Q_UNUSED(window) return createDispmanxLayer(QPoint(0, 0), size, 1, format.hasAlpha() ? DISPMANX_FLAGS_ALPHA_FROM_SOURCE : DISPMANX_FLAGS_ALPHA_FIXED_ALL_PIXELS); } -void QEglFSPiHooks::destroyNativeWindow(EGLNativeWindowType window) +void QEglFSBrcmIntegration::destroyNativeWindow(EGLNativeWindowType window) { destroyDispmanxLayer(window); } -bool QEglFSPiHooks::hasCapability(QPlatformIntegration::Capability cap) const +bool QEglFSBrcmIntegration::hasCapability(QPlatformIntegration::Capability cap) const { switch (cap) { case QPlatformIntegration::ThreadedPixmaps: @@ -148,7 +129,4 @@ bool QEglFSPiHooks::hasCapability(QPlatformIntegration::Capability cap) const } } -QEglFSPiHooks eglFSPiHooks; -QEglFSHooks *platformHooks = &eglFSPiHooks; - QT_END_NAMESPACE diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm/qeglfsbrcmintegration.h b/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm/qeglfsbrcmintegration.h new file mode 100644 index 0000000000..2a592b8445 --- /dev/null +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm/qeglfsbrcmintegration.h @@ -0,0 +1,55 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** 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 http://www.qt.io/terms-conditions. For further +** information use the contact form at http://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 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QEGLFSBRCMINTEGRATION_H +#define QEGLFSBRCMINTEGRATION_H + +#include "qeglfsdeviceintegration.h" + +QT_BEGIN_NAMESPACE + +class QEglFSBrcmIntegration : public QEGLDeviceIntegration +{ +public: + void platformInit() Q_DECL_OVERRIDE; + void platformDestroy() Q_DECL_OVERRIDE; + EGLNativeDisplayType platformDisplay() const Q_DECL_OVERRIDE; + QSize screenSize() const Q_DECL_OVERRIDE; + EGLNativeWindowType createNativeWindow(QPlatformWindow *window, const QSize &size, const QSurfaceFormat &format) Q_DECL_OVERRIDE; + void destroyNativeWindow(EGLNativeWindowType window) Q_DECL_OVERRIDE; + bool hasCapability(QPlatformIntegration::Capability cap) const Q_DECL_OVERRIDE; +}; + +QT_END_NAMESPACE + +#endif diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm/qeglfsbrcmmain.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm/qeglfsbrcmmain.cpp new file mode 100644 index 0000000000..eb10f3a1e6 --- /dev/null +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm/qeglfsbrcmmain.cpp @@ -0,0 +1,50 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** 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 http://www.qt.io/terms-conditions. For further +** information use the contact form at http://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 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qeglfsdeviceintegration.h" +#include "qeglfsbrcmintegration.h" + +QT_BEGIN_NAMESPACE + +class QEglFSBrcmIntegrationPlugin : public QEGLDeviceIntegrationPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID QEGLDeviceIntegrationFactoryInterface_iid FILE "eglfs_brcm.json") + +public: + QEGLDeviceIntegration *create() Q_DECL_OVERRIDE { return new QEglFSBrcmIntegration; } +}; + +QT_END_NAMESPACE + +#include "qeglfsbrcmmain.moc" diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/eglfs_kms.pro b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/eglfs_kms.pro index f79653127e..e53793ce54 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/eglfs_kms.pro +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/eglfs_kms.pro @@ -1,8 +1,7 @@ TARGET = qeglfs-kms-integration -PLUGIN_CLASS_NAME=QEglFSKmsIntegrationPlugin -PLUGIN_TYPE=egldeviceintegrations - +PLUGIN_TYPE = egldeviceintegrations +PLUGIN_CLASS_NAME = QEglFSKmsIntegrationPlugin load(qt_plugin) QT += core-private gui-private platformsupport-private eglfs_device_lib-private diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/eglfs_mali.json b/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/eglfs_mali.json new file mode 100644 index 0000000000..8cabc1abbd --- /dev/null +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/eglfs_mali.json @@ -0,0 +1,3 @@ +{ + "Keys": [ "eglfs_mali" ] +} diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/eglfs_mali.pro b/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/eglfs_mali.pro new file mode 100644 index 0000000000..dcfb4cd26d --- /dev/null +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/eglfs_mali.pro @@ -0,0 +1,18 @@ +TARGET = qeglfs-mali-integration + +PLUGIN_TYPE = egldeviceintegrations +PLUGIN_CLASS_NAME = QEglFSMaliIntegrationPlugin +load(qt_plugin) + +QT += core-private gui-private platformsupport-private eglfs_device_lib-private + +INCLUDEPATH += $$PWD/../.. +CONFIG += egl +QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF + +SOURCES += $$PWD/qeglfsmalimain.cpp \ + $$PWD/qeglfsmaliintegration.cpp + +HEADERS += $$PWD/qeglfsmaliintegration.h + +OTHER_FILES += $$PWD/eglfs_mali.json diff --git a/mkspecs/devices/linux-arm-hisilicon-hix5hd2-g++/qeglfshooks_hix5hd2.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/qeglfsmaliintegration.cpp index 9100a97646..6e5421d5b9 100644 --- a/mkspecs/devices/linux-arm-hisilicon-hix5hd2-g++/qeglfshooks_hix5hd2.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/qeglfsmaliintegration.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2015 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** -** This file is part of the qmake spec of the Qt Toolkit. +** This file is part of the plugins of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL21$ ** Commercial License Usage @@ -31,7 +31,7 @@ ** ****************************************************************************/ -#include "qeglfshooks.h" +#include "qeglfsmaliintegration.h" #include <EGL/fbdev_window.h> #include <unistd.h> @@ -43,18 +43,11 @@ QT_BEGIN_NAMESPACE -class QEglFSHiX5Hd2Hooks : public QEglFSHooks +void QEglFSMaliIntegration::platformInit() { -private: - void fbInit(); -public: - void platformInit() Q_DECL_OVERRIDE; - EGLNativeWindowType createNativeWindow(QPlatformWindow *window, const QSize &size, const QSurfaceFormat &format) Q_DECL_OVERRIDE; - void destroyNativeWindow(EGLNativeWindowType window) Q_DECL_OVERRIDE; -}; + // Keep the non-overridden base class functions based on fb0 working. + QEGLDeviceIntegration::platformInit(); -void QEglFSHiX5Hd2Hooks::fbInit() -{ int fd = qt_safe_open("/dev/fb0", O_RDWR, 0); if (fd == -1) qWarning("Failed to open fb to detect screen resolution!"); @@ -79,17 +72,13 @@ void QEglFSHiX5Hd2Hooks::fbInit() qErrnoWarning(errno, "Unable to set double buffer mode!"); qt_safe_close(fd); - return; } -void QEglFSHiX5Hd2Hooks::platformInit() +EGLNativeWindowType QEglFSMaliIntegration::createNativeWindow(QPlatformWindow *window, const QSize &size, const QSurfaceFormat &format) { - QEglFSHooks::platformInit(); - fbInit(); -} + Q_UNUSED(window); + Q_UNUSED(format); -EGLNativeWindowType QEglFSHiX5Hd2Hooks::createNativeWindow(QPlatformWindow *window, const QSize &size, const QSurfaceFormat &format) -{ fbdev_window *fbwin = reinterpret_cast<fbdev_window *>(malloc(sizeof(fbdev_window))); if (NULL == fbwin) return 0; @@ -99,12 +88,9 @@ EGLNativeWindowType QEglFSHiX5Hd2Hooks::createNativeWindow(QPlatformWindow *wind return (EGLNativeWindowType)fbwin; } -void QEglFSHiX5Hd2Hooks::destroyNativeWindow(EGLNativeWindowType window) +void QEglFSMaliIntegration::destroyNativeWindow(EGLNativeWindowType window) { free(window); } -QEglFSHiX5Hd2Hooks eglFSHiX5Hd2Hooks; -QEglFSHooks *platformHooks = &eglFSHiX5Hd2Hooks; - QT_END_NAMESPACE diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/qeglfsmaliintegration.h b/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/qeglfsmaliintegration.h new file mode 100644 index 0000000000..ebe468d70b --- /dev/null +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/qeglfsmaliintegration.h @@ -0,0 +1,51 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** 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 http://www.qt.io/terms-conditions. For further +** information use the contact form at http://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 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QEGLFSMALIINTEGRATION_H +#define QEGLFSMALIINTEGRATION_H + +#include "qeglfsdeviceintegration.h" + +QT_BEGIN_NAMESPACE + +class QEglFSMaliIntegration : public QEGLDeviceIntegration +{ +public: + void platformInit() Q_DECL_OVERRIDE; + EGLNativeWindowType createNativeWindow(QPlatformWindow *window, const QSize &size, const QSurfaceFormat &format) Q_DECL_OVERRIDE; + void destroyNativeWindow(EGLNativeWindowType window) Q_DECL_OVERRIDE; +}; + +QT_END_NAMESPACE + +#endif diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/qeglfsmalimain.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/qeglfsmalimain.cpp new file mode 100644 index 0000000000..0b90858efe --- /dev/null +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/qeglfsmalimain.cpp @@ -0,0 +1,50 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** 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 http://www.qt.io/terms-conditions. For further +** information use the contact form at http://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 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qeglfsdeviceintegration.h" +#include "qeglfsmaliintegration.h" + +QT_BEGIN_NAMESPACE + +class QEglFSMaliIntegrationPlugin : public QEGLDeviceIntegrationPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID QEGLDeviceIntegrationFactoryInterface_iid FILE "eglfs_mali.json") + +public: + QEGLDeviceIntegration *create() Q_DECL_OVERRIDE { return new QEglFSMaliIntegration; } +}; + +QT_END_NAMESPACE + +#include "qeglfsmalimain.moc" diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/eglfs_viv.json b/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/eglfs_viv.json new file mode 100644 index 0000000000..ae0cada044 --- /dev/null +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/eglfs_viv.json @@ -0,0 +1,3 @@ +{ + "Keys": [ "eglfs_viv" ] +} diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/eglfs_viv.pro b/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/eglfs_viv.pro new file mode 100644 index 0000000000..fc0533127c --- /dev/null +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/eglfs_viv.pro @@ -0,0 +1,20 @@ +TARGET = qeglfs-viv-integration + +PLUGIN_TYPE = egldeviceintegrations +PLUGIN_CLASS_NAME = QEglFSVivIntegrationPlugin +load(qt_plugin) + +QT += core-private gui-private platformsupport-private eglfs_device_lib-private + +INCLUDEPATH += $$PWD/../.. +CONFIG += egl +DEFINES += LINUX=1 EGL_API_FB=1 +LIBS += -lGAL +QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF + +SOURCES += $$PWD/qeglfsvivmain.cpp \ + $$PWD/qeglfsvivintegration.cpp + +HEADERS += $$PWD/qeglfsvivintegration.h + +OTHER_FILES += $$PWD/eglfs_viv.json diff --git a/mkspecs/devices/linux-imx6-g++/qeglfshooks_imx6.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/qeglfsvivintegration.cpp index b5ddafefdc..b7eb3fb2d3 100644 --- a/mkspecs/devices/linux-imx6-g++/qeglfshooks_imx6.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/qeglfsvivintegration.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2015 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** -** This file is part of the qmake spec of the Qt Toolkit. +** This file is part of the plugins of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL21$ ** Commercial License Usage @@ -31,35 +31,22 @@ ** ****************************************************************************/ -#include "qeglfshooks.h" +#include "qeglfsvivintegration.h" #include <EGL/eglvivante.h> #include <QDebug> QT_BEGIN_NAMESPACE -class QEglFSImx6Hooks : public QEglFSHooks +void QEglFSVivIntegration::platformInit() { -public: - QEglFSImx6Hooks(); - virtual QSize screenSize() const; - virtual EGLNativeWindowType createNativeWindow(QPlatformWindow *window, const QSize &size, const QSurfaceFormat &format); - virtual void destroyNativeWindow(EGLNativeWindowType window); - virtual EGLNativeDisplayType platformDisplay() const; + QEGLDeviceIntegration::platformInit(); -private: - QSize mScreenSize; - EGLNativeDisplayType mNativeDisplay; -}; - - -QEglFSImx6Hooks::QEglFSImx6Hooks() -{ int width, height; bool multiBufferNotEnabledYet = qEnvironmentVariableIsEmpty("FB_MULTI_BUFFER"); bool multiBuffer = qEnvironmentVariableIsEmpty("QT_EGLFS_IMX6_NO_FB_MULTI_BUFFER"); if (multiBufferNotEnabledYet && multiBuffer) { - qWarning() << "QEglFSImx6Hooks will set environment variable FB_MULTI_BUFFER=2 to enable double buffering and vsync.\n" + qWarning() << "QEglFSVivIntegration will set environment variable FB_MULTI_BUFFER=2 to enable double buffering and vsync.\n" << "If this is not desired, you can override this via: export QT_EGLFS_IMX6_NO_FB_MULTI_BUFFER=1"; qputenv("FB_MULTI_BUFFER", "2"); } @@ -70,17 +57,17 @@ QEglFSImx6Hooks::QEglFSImx6Hooks() mScreenSize.setWidth(width); } -QSize QEglFSImx6Hooks::screenSize() const +QSize QEglFSVivIntegration::screenSize() const { return mScreenSize; } -EGLNativeDisplayType QEglFSImx6Hooks::platformDisplay() const +EGLNativeDisplayType QEglFSVivIntegration::platformDisplay() const { return mNativeDisplay; } -EGLNativeWindowType QEglFSImx6Hooks::createNativeWindow(QPlatformWindow *window, const QSize &size, const QSurfaceFormat &format) +EGLNativeWindowType QEglFSVivIntegration::createNativeWindow(QPlatformWindow *window, const QSize &size, const QSurfaceFormat &format) { Q_UNUSED(window) Q_UNUSED(format) @@ -89,13 +76,9 @@ EGLNativeWindowType QEglFSImx6Hooks::createNativeWindow(QPlatformWindow *window, return eglWindow; } - -void QEglFSImx6Hooks::destroyNativeWindow(EGLNativeWindowType window) +void QEglFSVivIntegration::destroyNativeWindow(EGLNativeWindowType window) { fbDestroyWindow(window); } -QEglFSImx6Hooks eglFSImx6Hooks; -QEglFSHooks *platformHooks = &eglFSImx6Hooks; - QT_END_NAMESPACE diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/qeglfsvivintegration.h b/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/qeglfsvivintegration.h new file mode 100644 index 0000000000..181cd3ab94 --- /dev/null +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/qeglfsvivintegration.h @@ -0,0 +1,57 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** 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 http://www.qt.io/terms-conditions. For further +** information use the contact form at http://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 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QEGLFSVIVINTEGRATION_H +#define QEGLFSVIVINTEGRATION_H + +#include "qeglfsdeviceintegration.h" + +QT_BEGIN_NAMESPACE + +class QEglFSVivIntegration : public QEGLDeviceIntegration +{ +public: + void platformInit() Q_DECL_OVERRIDE; + QSize screenSize() const Q_DECL_OVERRIDE; + EGLNativeWindowType createNativeWindow(QPlatformWindow *window, const QSize &size, const QSurfaceFormat &format) Q_DECL_OVERRIDE; + void destroyNativeWindow(EGLNativeWindowType window) Q_DECL_OVERRIDE; + EGLNativeDisplayType platformDisplay() const Q_DECL_OVERRIDE; + +private: + QSize mScreenSize; + EGLNativeDisplayType mNativeDisplay; +}; + +QT_END_NAMESPACE + +#endif diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/qeglfsvivmain.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/qeglfsvivmain.cpp new file mode 100644 index 0000000000..11727f63f9 --- /dev/null +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/qeglfsvivmain.cpp @@ -0,0 +1,50 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** 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 http://www.qt.io/terms-conditions. For further +** information use the contact form at http://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 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qeglfsdeviceintegration.h" +#include "qeglfsvivintegration.h" + +QT_BEGIN_NAMESPACE + +class QEglFSVivIntegrationPlugin : public QEGLDeviceIntegrationPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID QEGLDeviceIntegrationFactoryInterface_iid FILE "eglfs_viv.json") + +public: + QEGLDeviceIntegration *create() Q_DECL_OVERRIDE { return new QEglFSVivIntegration; } +}; + +QT_END_NAMESPACE + +#include "qeglfsvivmain.moc" diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/eglfs_x11.pro b/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/eglfs_x11.pro index a1d08248ff..86fefac8aa 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/eglfs_x11.pro +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/eglfs_x11.pro @@ -1,8 +1,7 @@ TARGET = qeglfs-x11-integration -PLUGIN_CLASS_NAME=QEglFSX11IntegrationPlugin -PLUGIN_TYPE=egldeviceintegrations - +PLUGIN_TYPE = egldeviceintegrations +PLUGIN_CLASS_NAME = QEglFSX11IntegrationPlugin load(qt_plugin) QT += core-private gui-private platformsupport-private eglfs_device_lib-private |