Export gbm device integration to build it outside
Support external build for device integration which uses kms and gbm. QKmsScreenConfig supports inheritance to consider platform specific screen configuration. Task-number: QTBUG-85268 Change-Id: Iac58898a9cf0bb1d53237a719667a6ebd53d88b9 Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>bb10
parent
47d2f3cfe8
commit
ee3adcc642
|
|
@ -1033,7 +1033,6 @@ QKmsScreenConfig::QKmsScreenConfig()
|
|||
, m_pbuffers(false)
|
||||
, m_virtualDesktopLayout(VirtualDesktopLayoutHorizontal)
|
||||
{
|
||||
loadConfig();
|
||||
}
|
||||
|
||||
void QKmsScreenConfig::loadConfig()
|
||||
|
|
|
|||
|
|
@ -111,6 +111,7 @@ public:
|
|||
};
|
||||
|
||||
QKmsScreenConfig();
|
||||
virtual ~QKmsScreenConfig() {}
|
||||
|
||||
QString devicePath() const { return m_devicePath; }
|
||||
|
||||
|
|
@ -122,10 +123,9 @@ public:
|
|||
VirtualDesktopLayout virtualDesktopLayout() const { return m_virtualDesktopLayout; }
|
||||
|
||||
QMap<QString, QVariantMap> outputSettings() const { return m_outputSettings; }
|
||||
virtual void loadConfig();
|
||||
|
||||
private:
|
||||
void loadConfig();
|
||||
|
||||
protected:
|
||||
QString m_devicePath;
|
||||
bool m_headless;
|
||||
QSize m_headlessSize;
|
||||
|
|
|
|||
|
|
@ -1,19 +1,17 @@
|
|||
# Generated from eglfs_kms.pro.
|
||||
|
||||
#####################################################################
|
||||
## QEglFSKmsGbmIntegrationPlugin Plugin:
|
||||
## EglFsKmsGbmSupport Module:
|
||||
#####################################################################
|
||||
|
||||
qt_internal_add_plugin(QEglFSKmsGbmIntegrationPlugin
|
||||
OUTPUT_NAME qeglfs-kms-integration
|
||||
TYPE egldeviceintegrations
|
||||
qt_internal_add_module(EglFsKmsGbmSupport
|
||||
INTERNAL_MODULE
|
||||
SOURCES
|
||||
qeglfskmsgbmcursor.cpp qeglfskmsgbmcursor.h
|
||||
qeglfskmsgbmdevice.cpp qeglfskmsgbmdevice.h
|
||||
qeglfskmsgbmintegration.cpp qeglfskmsgbmintegration.h
|
||||
qeglfskmsgbmmain.cpp
|
||||
qeglfskmsgbmscreen.cpp qeglfskmsgbmscreen.h
|
||||
qeglfskmsgbmwindow.cpp qeglfskmsgbmwindow.h
|
||||
qeglfskmsgbmcursor.cpp qeglfskmsgbmcursor_p.h
|
||||
qeglfskmsgbmdevice.cpp qeglfskmsgbmdevice_p.h
|
||||
qeglfskmsgbmintegration.cpp qeglfskmsgbmintegration_p.h
|
||||
qeglfskmsgbmscreen.cpp qeglfskmsgbmscreen_p.h
|
||||
qeglfskmsgbmwindow.cpp qeglfskmsgbmwindow_p.h
|
||||
DEFINES
|
||||
QT_EGL_NO_X11
|
||||
INCLUDE_DIRECTORIES
|
||||
|
|
@ -31,5 +29,29 @@ qt_internal_add_plugin(QEglFSKmsGbmIntegrationPlugin
|
|||
gbm::gbm
|
||||
)
|
||||
|
||||
#### Keys ignored in scope 1:.:.:eglfs_kms.pro:<TRUE>:
|
||||
#####################################################################
|
||||
## QEglFSKmsGbmIntegrationPlugin Plugin:
|
||||
#####################################################################
|
||||
|
||||
qt_internal_add_plugin(QEglFSKmsGbmIntegrationPlugin
|
||||
OUTPUT_NAME qeglfs-kms-integration
|
||||
TYPE egldeviceintegrations
|
||||
SOURCES
|
||||
qeglfskmsgbmmain.cpp
|
||||
DEFINES
|
||||
QT_EGL_NO_X11
|
||||
PUBLIC_LIBRARIES
|
||||
Libdrm::Libdrm
|
||||
Qt::Core
|
||||
Qt::CorePrivate
|
||||
Qt::EglFSDeviceIntegrationPrivate
|
||||
Qt::EglFsKmsGbmSupportPrivate
|
||||
Qt::EglFsKmsSupportPrivate
|
||||
Qt::Gui
|
||||
Qt::GuiPrivate
|
||||
Qt::KmsSupportPrivate
|
||||
gbm::gbm
|
||||
)
|
||||
|
||||
#### Keys ignored in scope 1:.:.:eglfs_kms-plugin.pro:<TRUE>:
|
||||
# OTHER_FILES = "$$PWD/eglfs_kms.json"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
TARGET = qeglfs-kms-integration
|
||||
|
||||
PLUGIN_TYPE = egldeviceintegrations
|
||||
PLUGIN_CLASS_NAME = QEglFSKmsGbmIntegrationPlugin
|
||||
load(qt_plugin)
|
||||
|
||||
QT += core-private gui-private eglfsdeviceintegration-private eglfs_kms_support-private kms_support-private eglfs_kms_gbm_support-private
|
||||
|
||||
# Avoid X11 header collision, use generic EGL native types
|
||||
DEFINES += QT_EGL_NO_X11
|
||||
|
||||
QMAKE_USE += gbm drm
|
||||
CONFIG += egl
|
||||
|
||||
SOURCES += $$PWD/qeglfskmsgbmmain.cpp
|
||||
|
||||
OTHER_FILES += $$PWD/eglfs_kms.json
|
||||
|
|
@ -1,30 +1,5 @@
|
|||
TARGET = qeglfs-kms-integration
|
||||
TEMPLATE = subdirs
|
||||
CONFIG += ordered
|
||||
|
||||
PLUGIN_TYPE = egldeviceintegrations
|
||||
PLUGIN_CLASS_NAME = QEglFSKmsGbmIntegrationPlugin
|
||||
load(qt_plugin)
|
||||
|
||||
QT += core-private gui-private eglfsdeviceintegration-private eglfs_kms_support-private kms_support-private
|
||||
|
||||
INCLUDEPATH += $$PWD/../../api $$PWD/../eglfs_kms_support
|
||||
|
||||
# Avoid X11 header collision, use generic EGL native types
|
||||
DEFINES += QT_EGL_NO_X11
|
||||
|
||||
QMAKE_USE += gbm drm
|
||||
CONFIG += egl
|
||||
|
||||
SOURCES += $$PWD/qeglfskmsgbmmain.cpp \
|
||||
$$PWD/qeglfskmsgbmintegration.cpp \
|
||||
$$PWD/qeglfskmsgbmdevice.cpp \
|
||||
$$PWD/qeglfskmsgbmscreen.cpp \
|
||||
$$PWD/qeglfskmsgbmcursor.cpp \
|
||||
$$PWD/qeglfskmsgbmwindow.cpp
|
||||
|
||||
HEADERS += $$PWD/qeglfskmsgbmintegration.h \
|
||||
$$PWD/qeglfskmsgbmdevice.h \
|
||||
$$PWD/qeglfskmsgbmscreen.h \
|
||||
$$PWD/qeglfskmsgbmcursor.h \
|
||||
$$PWD/qeglfskmsgbmwindow.h
|
||||
|
||||
OTHER_FILES += $$PWD/eglfs_kms.json
|
||||
SUBDIRS += eglfs_kms_gbm_support.pro
|
||||
SUBDIRS += eglfs_kms-plugin.pro
|
||||
|
|
|
|||
|
|
@ -0,0 +1,25 @@
|
|||
TARGET = QtEglFsKmsGbmSupport
|
||||
CONFIG += internal_module
|
||||
load(qt_module)
|
||||
|
||||
QT += core-private gui-private eglfsdeviceintegration-private eglfs_kms_support-private kms_support-private
|
||||
|
||||
INCLUDEPATH += $$PWD/../../api $$PWD/../eglfs_kms_support
|
||||
|
||||
# Avoid X11 header collision, use generic EGL native types
|
||||
DEFINES += QT_EGL_NO_X11
|
||||
|
||||
QMAKE_USE += gbm drm
|
||||
CONFIG += egl
|
||||
|
||||
SOURCES += $$PWD/qeglfskmsgbmintegration.cpp \
|
||||
$$PWD/qeglfskmsgbmdevice.cpp \
|
||||
$$PWD/qeglfskmsgbmscreen.cpp \
|
||||
$$PWD/qeglfskmsgbmcursor.cpp \
|
||||
$$PWD/qeglfskmsgbmwindow.cpp
|
||||
|
||||
HEADERS += $$PWD/qeglfskmsgbmintegration_p.h \
|
||||
$$PWD/qeglfskmsgbmdevice_p.h \
|
||||
$$PWD/qeglfskmsgbmscreen_p.h \
|
||||
$$PWD/qeglfskmsgbmcursor_p.h \
|
||||
$$PWD/qeglfskmsgbmwindow_p.h
|
||||
|
|
@ -39,9 +39,9 @@
|
|||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qeglfskmsgbmcursor.h"
|
||||
#include "qeglfskmsgbmscreen.h"
|
||||
#include "qeglfskmsgbmdevice.h"
|
||||
#include "qeglfskmsgbmcursor_p.h"
|
||||
#include "qeglfskmsgbmscreen_p.h"
|
||||
#include "qeglfskmsgbmdevice_p.h"
|
||||
|
||||
#include <QtCore/QFile>
|
||||
#include <QtCore/QJsonDocument>
|
||||
|
|
|
|||
|
|
@ -40,6 +40,17 @@
|
|||
#ifndef QEGLFSKMSGBMCURSOR_H
|
||||
#define QEGLFSKMSGBMCURSOR_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <qpa/qplatformcursor.h>
|
||||
#include <QtCore/QList>
|
||||
#include <QtGui/QImage>
|
||||
|
|
@ -39,8 +39,8 @@
|
|||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qeglfskmsgbmdevice.h"
|
||||
#include "qeglfskmsgbmscreen.h"
|
||||
#include "qeglfskmsgbmdevice_p.h"
|
||||
#include "qeglfskmsgbmscreen_p.h"
|
||||
|
||||
#include "qeglfsintegration_p.h"
|
||||
|
||||
|
|
@ -131,14 +131,19 @@ void QEglFSKmsGbmDevice::destroyGlobalCursor()
|
|||
}
|
||||
}
|
||||
|
||||
QPlatformScreen *QEglFSKmsGbmDevice::createScreen(const QKmsOutput &output)
|
||||
void QEglFSKmsGbmDevice::createGlobalCursor(QEglFSKmsGbmScreen *screen)
|
||||
{
|
||||
QEglFSKmsGbmScreen *screen = new QEglFSKmsGbmScreen(this, output, false);
|
||||
|
||||
if (!m_globalCursor && screenConfig()->hwCursor()) {
|
||||
qCDebug(qLcEglfsKmsDebug, "Creating new global GBM mouse cursor");
|
||||
m_globalCursor = new QEglFSKmsGbmCursor(screen);
|
||||
}
|
||||
}
|
||||
|
||||
QPlatformScreen *QEglFSKmsGbmDevice::createScreen(const QKmsOutput &output)
|
||||
{
|
||||
QEglFSKmsGbmScreen *screen = new QEglFSKmsGbmScreen(this, output, false);
|
||||
|
||||
createGlobalCursor(screen);
|
||||
|
||||
return screen;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,8 +42,19 @@
|
|||
#ifndef QEGLFSKMSGBMDEVICE_H
|
||||
#define QEGLFSKMSGBMDEVICE_H
|
||||
|
||||
#include "qeglfskmsgbmcursor.h"
|
||||
#include <qeglfskmsdevice.h>
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "qeglfskmsgbmcursor_p.h"
|
||||
#include <qeglfskmsdevice_p.h>
|
||||
|
||||
#include <gbm.h>
|
||||
|
||||
|
|
@ -51,7 +62,7 @@ QT_BEGIN_NAMESPACE
|
|||
|
||||
class QEglFSKmsScreen;
|
||||
|
||||
class QEglFSKmsGbmDevice: public QEglFSKmsDevice
|
||||
class Q_EGLFS_EXPORT QEglFSKmsGbmDevice: public QEglFSKmsDevice
|
||||
{
|
||||
public:
|
||||
QEglFSKmsGbmDevice(QKmsScreenConfig *screenConfig, const QString &path);
|
||||
|
|
@ -64,6 +75,7 @@ public:
|
|||
|
||||
QPlatformCursor *globalCursor() const;
|
||||
void destroyGlobalCursor();
|
||||
void createGlobalCursor(QEglFSKmsGbmScreen *screen);
|
||||
|
||||
QPlatformScreen *createScreen(const QKmsOutput &output) override;
|
||||
QPlatformScreen *createHeadlessScreen() override;
|
||||
|
|
@ -39,11 +39,11 @@
|
|||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qeglfskmsgbmintegration.h"
|
||||
#include "qeglfskmsgbmdevice.h"
|
||||
#include "qeglfskmsgbmscreen.h"
|
||||
#include "qeglfskmsgbmcursor.h"
|
||||
#include "qeglfskmsgbmwindow.h"
|
||||
#include "qeglfskmsgbmintegration_p.h"
|
||||
#include "qeglfskmsgbmdevice_p.h"
|
||||
#include "qeglfskmsgbmscreen_p.h"
|
||||
#include "qeglfskmsgbmcursor_p.h"
|
||||
#include "qeglfskmsgbmwindow_p.h"
|
||||
#include "private/qeglfscursor_p.h"
|
||||
|
||||
#include <QtCore/QLoggingCategory>
|
||||
|
|
|
|||
|
|
@ -42,7 +42,18 @@
|
|||
#ifndef QEGLFSKMSGBMINTEGRATION_H
|
||||
#define QEGLFSKMSGBMINTEGRATION_H
|
||||
|
||||
#include "qeglfskmsintegration.h"
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <private/qeglfskmsintegration_p.h>
|
||||
#include <QtCore/QMap>
|
||||
#include <QtCore/QVariant>
|
||||
|
||||
|
|
@ -50,7 +61,7 @@ QT_BEGIN_NAMESPACE
|
|||
|
||||
class QEglFSKmsDevice;
|
||||
|
||||
class QEglFSKmsGbmIntegration : public QEglFSKmsIntegration
|
||||
class Q_EGLFS_EXPORT QEglFSKmsGbmIntegration : public QEglFSKmsIntegration
|
||||
{
|
||||
public:
|
||||
QEglFSKmsGbmIntegration();
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
****************************************************************************/
|
||||
|
||||
#include "private/qeglfsdeviceintegration_p.h"
|
||||
#include "qeglfskmsgbmintegration.h"
|
||||
#include "qeglfskmsgbmintegration_p.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
|
|
|||
|
|
@ -39,9 +39,9 @@
|
|||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qeglfskmsgbmscreen.h"
|
||||
#include "qeglfskmsgbmdevice.h"
|
||||
#include "qeglfskmsgbmcursor.h"
|
||||
#include "qeglfskmsgbmscreen_p.h"
|
||||
#include "qeglfskmsgbmdevice_p.h"
|
||||
#include "qeglfskmsgbmcursor_p.h"
|
||||
#include "qeglfsintegration_p.h"
|
||||
|
||||
#include <QtCore/QLoggingCategory>
|
||||
|
|
|
|||
|
|
@ -42,7 +42,18 @@
|
|||
#ifndef QEGLFSKMSGBMSCREEN_H
|
||||
#define QEGLFSKMSGBMSCREEN_H
|
||||
|
||||
#include "qeglfskmsscreen.h"
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "qeglfskmsscreen_p.h"
|
||||
#include <QMutex>
|
||||
#include <QWaitCondition>
|
||||
|
||||
|
|
@ -52,7 +63,7 @@ QT_BEGIN_NAMESPACE
|
|||
|
||||
class QEglFSKmsGbmCursor;
|
||||
|
||||
class QEglFSKmsGbmScreen : public QEglFSKmsScreen
|
||||
class Q_EGLFS_EXPORT QEglFSKmsGbmScreen : public QEglFSKmsScreen
|
||||
{
|
||||
public:
|
||||
QEglFSKmsGbmScreen(QEglFSKmsDevice *device, const QKmsOutput &output, bool headless);
|
||||
|
|
@ -68,13 +79,13 @@ public:
|
|||
|
||||
void waitForFlip() override;
|
||||
|
||||
void flip();
|
||||
virtual void flip();
|
||||
virtual void updateFlipStatus();
|
||||
|
||||
private:
|
||||
protected:
|
||||
void flipFinished();
|
||||
void ensureModeSet(uint32_t fb);
|
||||
void cloneDestFlipFinished(QEglFSKmsGbmScreen *cloneDestScreen);
|
||||
void updateFlipStatus();
|
||||
|
||||
gbm_surface *m_gbm_surface;
|
||||
|
||||
|
|
@ -37,9 +37,9 @@
|
|||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qeglfskmsgbmwindow.h"
|
||||
#include "qeglfskmsgbmintegration.h"
|
||||
#include "qeglfskmsgbmscreen.h"
|
||||
#include "qeglfskmsgbmwindow_p.h"
|
||||
#include "qeglfskmsgbmintegration_p.h"
|
||||
#include "qeglfskmsgbmscreen_p.h"
|
||||
|
||||
#include <QtGui/private/qeglconvenience_p.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -42,13 +42,24 @@
|
|||
#ifndef QEGLFSKMSGBMWINDOW_H
|
||||
#define QEGLFSKMSGBMWINDOW_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "private/qeglfswindow_p.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QEglFSKmsGbmIntegration;
|
||||
|
||||
class QEglFSKmsGbmWindow : public QEglFSWindow
|
||||
class Q_EGLFS_EXPORT QEglFSKmsGbmWindow : public QEglFSWindow
|
||||
{
|
||||
public:
|
||||
QEglFSKmsGbmWindow(QWindow *w, const QEglFSKmsGbmIntegration *integration)
|
||||
|
|
@ -40,7 +40,7 @@
|
|||
#ifndef QEGLFSKMSEGLDEVICE_H
|
||||
#define QEGLFSKMSEGLDEVICE_H
|
||||
|
||||
#include <qeglfskmsdevice.h>
|
||||
#include <qeglfskmsdevice_p.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
#ifndef QEGLFSKMSEGLDEVICEINTEGRATION_H
|
||||
#define QEGLFSKMSEGLDEVICEINTEGRATION_H
|
||||
|
||||
#include <qeglfskmsintegration.h>
|
||||
#include <qeglfskmsintegration_p.h>
|
||||
|
||||
#include <xf86drm.h>
|
||||
#include <xf86drmMode.h>
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
#ifndef QEGLFSKMSEGLDEVICESCREEN_H
|
||||
#define QEGLFSKMSEGLDEVICESCREEN_H
|
||||
|
||||
#include <qeglfskmsscreen.h>
|
||||
#include <qeglfskmsscreen_p.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
|
|
|||
|
|
@ -6,13 +6,12 @@
|
|||
|
||||
qt_internal_add_module(EglFsKmsSupport
|
||||
INTERNAL_MODULE
|
||||
NO_MODULE_HEADERS
|
||||
SOURCES
|
||||
qeglfskmsdevice.cpp qeglfskmsdevice.h
|
||||
qeglfskmseventreader.cpp qeglfskmseventreader.h
|
||||
qeglfskmshelpers.h
|
||||
qeglfskmsintegration.cpp qeglfskmsintegration.h
|
||||
qeglfskmsscreen.cpp qeglfskmsscreen.h
|
||||
qeglfskmsdevice.cpp qeglfskmsdevice_p.h
|
||||
qeglfskmseventreader.cpp qeglfskmseventreader_p.h
|
||||
qeglfskmshelpers_p.h
|
||||
qeglfskmsintegration.cpp qeglfskmsintegration_p.h
|
||||
qeglfskmsscreen.cpp qeglfskmsscreen_p.h
|
||||
DEFINES
|
||||
QT_EGL_NO_X11
|
||||
INCLUDE_DIRECTORIES
|
||||
|
|
|
|||
|
|
@ -6,13 +6,12 @@
|
|||
|
||||
qt_internal_add_module(EglFsKmsSupport
|
||||
INTERNAL_MODULE
|
||||
NO_MODULE_HEADERS
|
||||
SOURCES
|
||||
qeglfskmsdevice.cpp qeglfskmsdevice.h
|
||||
qeglfskmseventreader.cpp qeglfskmseventreader.h
|
||||
qeglfskmshelpers.h
|
||||
qeglfskmsintegration.cpp qeglfskmsintegration.h
|
||||
qeglfskmsscreen.cpp qeglfskmsscreen.h
|
||||
qeglfskmsdevice.cpp qeglfskmsdevice_p.h
|
||||
qeglfskmseventreader.cpp qeglfskmseventreader_p.h
|
||||
qeglfskmshelpers_p.h
|
||||
qeglfskmsintegration.cpp qeglfskmsintegration_p.h
|
||||
qeglfskmsscreen.cpp qeglfskmsscreen_p.h
|
||||
DEFINES
|
||||
QT_EGL_NO_X11
|
||||
INCLUDE_DIRECTORIES
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
TARGET = QtEglFsKmsSupport
|
||||
CONFIG += no_module_headers internal_module
|
||||
CONFIG += internal_module
|
||||
load(qt_module)
|
||||
|
||||
QT += core-private gui-private eglfsdeviceintegration-private kms_support-private
|
||||
|
|
@ -17,8 +17,8 @@ SOURCES += $$PWD/qeglfskmsintegration.cpp \
|
|||
$$PWD/qeglfskmsscreen.cpp \
|
||||
$$PWD/qeglfskmseventreader.cpp
|
||||
|
||||
HEADERS += $$PWD/qeglfskmsintegration.h \
|
||||
$$PWD/qeglfskmsdevice.h \
|
||||
$$PWD/qeglfskmsscreen.h \
|
||||
$$PWD/qeglfskmshelpers.h \
|
||||
$$PWD/qeglfskmseventreader.h
|
||||
HEADERS += $$PWD/qeglfskmsintegration_p.h \
|
||||
$$PWD/qeglfskmsdevice_p.h \
|
||||
$$PWD/qeglfskmsscreen_p.h \
|
||||
$$PWD/qeglfskmshelpers_p.h \
|
||||
$$PWD/qeglfskmseventreader_p.h
|
||||
|
|
|
|||
|
|
@ -38,8 +38,8 @@
|
|||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qeglfskmsdevice.h"
|
||||
#include "qeglfskmsscreen.h"
|
||||
#include "qeglfskmsdevice_p.h"
|
||||
#include "qeglfskmsscreen_p.h"
|
||||
#include "private/qeglfsintegration_p.h"
|
||||
#include <QtGui/private/qguiapplication_p.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -41,8 +41,19 @@
|
|||
#ifndef QEGLFSKMSDEVICE_H
|
||||
#define QEGLFSKMSDEVICE_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "private/qeglfsglobal_p.h"
|
||||
#include "qeglfskmseventreader.h"
|
||||
#include "qeglfskmseventreader_p.h"
|
||||
#include <QtKmsSupport/private/qkmsdevice_p.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
|
@ -37,8 +37,8 @@
|
|||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qeglfskmseventreader.h"
|
||||
#include "qeglfskmsdevice.h"
|
||||
#include "qeglfskmseventreader_p.h"
|
||||
#include "qeglfskmsdevice_p.h"
|
||||
#include <QSocketNotifier>
|
||||
#include <QCoreApplication>
|
||||
#include <QLoggingCategory>
|
||||
|
|
|
|||
|
|
@ -40,6 +40,17 @@
|
|||
#ifndef QEGLFSKKMSEVENTREADER_H
|
||||
#define QEGLFSKKMSEVENTREADER_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "private/qeglfsglobal_p.h"
|
||||
#include <QObject>
|
||||
#include <QThread>
|
||||
|
|
@ -40,6 +40,17 @@
|
|||
#ifndef QEGLFSKMSHELPERS_H
|
||||
#define QEGLFSKMSHELPERS_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QString>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
|
@ -39,8 +39,8 @@
|
|||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qeglfskmsintegration.h"
|
||||
#include "qeglfskmsscreen.h"
|
||||
#include "qeglfskmsintegration_p.h"
|
||||
#include "qeglfskmsscreen_p.h"
|
||||
|
||||
#include <QtKmsSupport/private/qkmsdevice_p.h>
|
||||
|
||||
|
|
@ -55,18 +55,19 @@ QT_BEGIN_NAMESPACE
|
|||
Q_LOGGING_CATEGORY(qLcEglfsKmsDebug, "qt.qpa.eglfs.kms")
|
||||
|
||||
QEglFSKmsIntegration::QEglFSKmsIntegration()
|
||||
: m_device(nullptr),
|
||||
m_screenConfig(new QKmsScreenConfig)
|
||||
: m_device(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
QEglFSKmsIntegration::~QEglFSKmsIntegration()
|
||||
{
|
||||
delete m_screenConfig;
|
||||
}
|
||||
|
||||
void QEglFSKmsIntegration::platformInit()
|
||||
{
|
||||
qCDebug(qLcEglfsKmsDebug, "platformInit: Load Screen Config");
|
||||
m_screenConfig = createScreenConfig();
|
||||
|
||||
qCDebug(qLcEglfsKmsDebug, "platformInit: Opening DRM device");
|
||||
m_device = createDevice();
|
||||
if (Q_UNLIKELY(!m_device->open()))
|
||||
|
|
@ -79,6 +80,8 @@ void QEglFSKmsIntegration::platformDestroy()
|
|||
m_device->close();
|
||||
delete m_device;
|
||||
m_device = nullptr;
|
||||
delete m_screenConfig;
|
||||
m_screenConfig = nullptr;
|
||||
}
|
||||
|
||||
EGLNativeDisplayType QEglFSKmsIntegration::platformDisplay() const
|
||||
|
|
@ -167,4 +170,12 @@ QKmsScreenConfig *QEglFSKmsIntegration::screenConfig() const
|
|||
return m_screenConfig;
|
||||
}
|
||||
|
||||
QKmsScreenConfig *QEglFSKmsIntegration::createScreenConfig()
|
||||
{
|
||||
QKmsScreenConfig *screenConfig = new QKmsScreenConfig;
|
||||
screenConfig->loadConfig();
|
||||
|
||||
return screenConfig;
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -42,6 +42,17 @@
|
|||
#ifndef QEGLFSKMSINTEGRATION_H
|
||||
#define QEGLFSKMSINTEGRATION_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "private/qeglfsdeviceintegration_p.h"
|
||||
#include <QtCore/QMap>
|
||||
#include <QtCore/QVariant>
|
||||
|
|
@ -77,9 +88,10 @@ public:
|
|||
|
||||
protected:
|
||||
virtual QKmsDevice *createDevice() = 0;
|
||||
virtual QKmsScreenConfig *createScreenConfig();
|
||||
|
||||
QKmsDevice *m_device;
|
||||
QKmsScreenConfig *m_screenConfig;
|
||||
QKmsScreenConfig *m_screenConfig = nullptr;
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
@ -39,8 +39,8 @@
|
|||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qeglfskmsscreen.h"
|
||||
#include "qeglfskmsdevice.h"
|
||||
#include "qeglfskmsscreen_p.h"
|
||||
#include "qeglfskmsdevice_p.h"
|
||||
#include "qeglfsintegration_p.h"
|
||||
|
||||
#include <QtCore/QLoggingCategory>
|
||||
|
|
|
|||
|
|
@ -42,6 +42,17 @@
|
|||
#ifndef QEGLFSKMSSCREEN_H
|
||||
#define QEGLFSKMSSCREEN_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists purely as an
|
||||
// implementation detail. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include "private/qeglfsscreen_p.h"
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QMutex>
|
||||
|
|
@ -42,7 +42,7 @@
|
|||
#ifndef QEGLFSKMSVSP2DEVICE_H
|
||||
#define QEGLFSKMSVSP2DEVICE_H
|
||||
|
||||
#include <qeglfskmsdevice.h>
|
||||
#include <qeglfskmsdevice_p.h>
|
||||
|
||||
#include <gbm.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
#ifndef QEGLFSKMSVSP2INTEGRATION_H
|
||||
#define QEGLFSKMSVSP2INTEGRATION_H
|
||||
|
||||
#include "qeglfskmsintegration.h"
|
||||
#include "qeglfskmsintegration_p.h"
|
||||
#include <QtCore/QMap>
|
||||
#include <QtCore/QVariant>
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
#include "qeglfskmsvsp2screen.h"
|
||||
#include "qeglfskmsvsp2device.h"
|
||||
#include <qeglfskmshelpers.h>
|
||||
#include <qeglfskmshelpers_p.h>
|
||||
|
||||
#include <QtCore/QLoggingCategory>
|
||||
#include <QtGui/private/qguiapplication_p.h>
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
#ifndef QEGLFSKMSVSP2SCREEN_H
|
||||
#define QEGLFSKMSVSP2SCREEN_H
|
||||
|
||||
#include "qeglfskmsscreen.h"
|
||||
#include "qeglfskmsscreen_p.h"
|
||||
#include "qvsp2blendingdevice.h"
|
||||
#include <QtCore/QMutex>
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
#include "qeglfsintegration_p.h"
|
||||
#include "qlinuxmediadevice.h"
|
||||
#include <qeglfskmshelpers.h>
|
||||
#include <qeglfskmshelpers_p.h>
|
||||
|
||||
#include <QtCore/QLoggingCategory>
|
||||
#include <QtCore/QSize>
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
****************************************************************************/
|
||||
|
||||
#include "qvsp2blendingdevice.h"
|
||||
#include <qeglfskmshelpers.h>
|
||||
#include <qeglfskmshelpers_p.h>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QtCore/QLoggingCategory>
|
||||
|
|
|
|||
|
|
@ -399,6 +399,7 @@ QLinuxFbDrmScreen::~QLinuxFbDrmScreen()
|
|||
bool QLinuxFbDrmScreen::initialize()
|
||||
{
|
||||
m_screenConfig = new QKmsScreenConfig;
|
||||
m_screenConfig->loadConfig();
|
||||
m_device = new QLinuxFbDevice(m_screenConfig);
|
||||
if (!m_device->open())
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@
|
|||
"QtKmsSupport" => "$basedir/src/platformsupport/kmsconvenience",
|
||||
"QtZlib" => "!>$basedir/src/corelib;$basedir/src/3rdparty/zlib",
|
||||
"QtEglFSDeviceIntegration" => "$basedir/src/plugins/platforms/eglfs",
|
||||
"QtEglFsKmsSupport" => "$basedir/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support",
|
||||
"QtEglFsKmsGbmSupport" => "$basedir/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms",
|
||||
"QtMockPlugins1" => "$basedir/tests/auto/cmake/mockplugins/mockplugins1",
|
||||
"QtMockPlugins2" => "$basedir/tests/auto/cmake/mockplugins/mockplugins2",
|
||||
"QtMockPlugins3" => "$basedir/tests/auto/cmake/mockplugins/mockplugins3",
|
||||
|
|
|
|||
Loading…
Reference in New Issue