Install some eglfsdeviceintegration headers, as a private module
This allows external integrations to be developed against it. Also uniforms all class names as QEglFSFoo. Change-Id: I72ff37c0fcdf1ccd37110b4c36874d6c99b2e743 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>bb10
parent
3ec57107ce
commit
ec4eb4db61
|
|
@ -37,7 +37,7 @@
|
|||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qeglfshooks.h"
|
||||
#include "private/qeglfshooks_p.h"
|
||||
#include <EGL/fbdev_window.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
|
||||
SOURCES += $$PWD/qeglfswindow.cpp \
|
||||
$$PWD/qeglfsscreen.cpp \
|
||||
$$PWD/qeglfscursor.cpp \
|
||||
$$PWD/qeglfshooks.cpp \
|
||||
$$PWD/qeglfsdeviceintegration.cpp
|
||||
|
||||
HEADERS += $$PWD/qeglfswindow_p.h \
|
||||
$$PWD/qeglfsscreen_p.h \
|
||||
$$PWD/qeglfscursor_p.h \
|
||||
$$PWD/qeglfshooks_p.h \
|
||||
$$PWD/qeglfsdeviceintegration_p.h \
|
||||
$$PWD/qeglfsglobal.h
|
||||
|
||||
INCLUDEPATH += $$PWD
|
||||
|
|
@ -37,9 +37,9 @@
|
|||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qeglfscursor.h"
|
||||
#include "qeglfscursor_p.h"
|
||||
#include "qeglfsintegration.h"
|
||||
#include "qeglfsscreen.h"
|
||||
#include "qeglfsscreen_p.h"
|
||||
|
||||
#include <qpa/qwindowsysteminterface.h>
|
||||
#include <QtGui/QOpenGLContext>
|
||||
|
|
@ -37,10 +37,12 @@
|
|||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qeglfsdeviceintegration.h"
|
||||
#include "qeglfsdeviceintegration_p.h"
|
||||
#include "qeglfsintegration.h"
|
||||
#include "qeglfscursor.h"
|
||||
#include "qeglfswindow.h"
|
||||
#include "qeglfscursor_p.h"
|
||||
#include "qeglfswindow_p.h"
|
||||
#include "qeglfshooks_p.h"
|
||||
|
||||
#include <QtPlatformSupport/private/qeglconvenience_p.h>
|
||||
#include <QGuiApplication>
|
||||
#include <private/qguiapplication_p.h>
|
||||
|
|
@ -64,14 +66,28 @@ QT_BEGIN_NAMESPACE
|
|||
Q_LOGGING_CATEGORY(qLcEglDevDebug, "qt.qpa.egldeviceintegration")
|
||||
|
||||
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
|
||||
(QEGLDeviceIntegrationFactoryInterface_iid, QLatin1String("/egldeviceintegrations"), Qt::CaseInsensitive))
|
||||
(QEglFSDeviceIntegrationFactoryInterface_iid, QLatin1String("/egldeviceintegrations"), Qt::CaseInsensitive))
|
||||
|
||||
#ifndef QT_NO_LIBRARY
|
||||
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader,
|
||||
(QEGLDeviceIntegrationFactoryInterface_iid, QLatin1String(""), Qt::CaseInsensitive))
|
||||
(QEglFSDeviceIntegrationFactoryInterface_iid, QLatin1String(""), Qt::CaseInsensitive))
|
||||
|
||||
static inline QEglFSDeviceIntegration *loadIntegration(QFactoryLoader *loader, const QString &key)
|
||||
{
|
||||
const int index = loader->indexOf(key);
|
||||
if (index != -1) {
|
||||
QObject *plugin = loader->instance(index);
|
||||
if (QEglFSDeviceIntegrationPlugin *factory = qobject_cast<QEglFSDeviceIntegrationPlugin *>(plugin)) {
|
||||
if (QEglFSDeviceIntegration *result = factory->create())
|
||||
return result;
|
||||
}
|
||||
}
|
||||
return Q_NULLPTR;
|
||||
}
|
||||
|
||||
#endif // QT_NO_LIBRARY
|
||||
|
||||
QStringList QEGLDeviceIntegrationFactory::keys(const QString &pluginPath)
|
||||
QStringList QEglFSDeviceIntegrationFactory::keys(const QString &pluginPath)
|
||||
{
|
||||
QStringList list;
|
||||
#ifndef QT_NO_LIBRARY
|
||||
|
|
@ -95,19 +111,19 @@ QStringList QEGLDeviceIntegrationFactory::keys(const QString &pluginPath)
|
|||
return list;
|
||||
}
|
||||
|
||||
QEGLDeviceIntegration *QEGLDeviceIntegrationFactory::create(const QString &key, const QString &pluginPath)
|
||||
QEglFSDeviceIntegration *QEglFSDeviceIntegrationFactory::create(const QString &key, const QString &pluginPath)
|
||||
{
|
||||
QEGLDeviceIntegration *integration = Q_NULLPTR;
|
||||
QEglFSDeviceIntegration *integration = Q_NULLPTR;
|
||||
#ifndef QT_NO_LIBRARY
|
||||
if (!pluginPath.isEmpty()) {
|
||||
QCoreApplication::addLibraryPath(pluginPath);
|
||||
integration = qLoadPlugin<QEGLDeviceIntegration, QEGLDeviceIntegrationPlugin>(directLoader(), key);
|
||||
integration = qLoadPlugin<QEglFSDeviceIntegration, QEglFSDeviceIntegrationPlugin>(directLoader(), key);
|
||||
}
|
||||
#else
|
||||
Q_UNUSED(pluginPath);
|
||||
#endif
|
||||
if (!integration)
|
||||
integration = qLoadPlugin<QEGLDeviceIntegration, QEGLDeviceIntegrationPlugin>(loader(), key);
|
||||
integration = qLoadPlugin<QEglFSDeviceIntegration, QEglFSDeviceIntegrationPlugin>(loader(), key);
|
||||
if (integration)
|
||||
qCDebug(qLcEglDevDebug) << "Using EGL device integration" << key;
|
||||
else
|
||||
|
|
@ -118,7 +134,7 @@ QEGLDeviceIntegration *QEGLDeviceIntegrationFactory::create(const QString &key,
|
|||
|
||||
static int framebuffer = -1;
|
||||
|
||||
QByteArray QEGLDeviceIntegration::fbDeviceName() const
|
||||
QByteArray QEglFSDeviceIntegration::fbDeviceName() const
|
||||
{
|
||||
#ifdef Q_OS_LINUX
|
||||
QByteArray fbDev = qgetenv("QT_QPA_EGLFS_FB");
|
||||
|
|
@ -131,7 +147,7 @@ QByteArray QEGLDeviceIntegration::fbDeviceName() const
|
|||
#endif
|
||||
}
|
||||
|
||||
int QEGLDeviceIntegration::framebufferIndex() const
|
||||
int QEglFSDeviceIntegration::framebufferIndex() const
|
||||
{
|
||||
int fbIndex = 0;
|
||||
#ifndef QT_NO_REGULAREXPRESSION
|
||||
|
|
@ -143,7 +159,7 @@ int QEGLDeviceIntegration::framebufferIndex() const
|
|||
return fbIndex;
|
||||
}
|
||||
|
||||
void QEGLDeviceIntegration::platformInit()
|
||||
void QEglFSDeviceIntegration::platformInit()
|
||||
{
|
||||
#ifdef Q_OS_LINUX
|
||||
QByteArray fbDev = fbDeviceName();
|
||||
|
|
@ -161,7 +177,7 @@ void QEGLDeviceIntegration::platformInit()
|
|||
#endif
|
||||
}
|
||||
|
||||
void QEGLDeviceIntegration::platformDestroy()
|
||||
void QEglFSDeviceIntegration::platformDestroy()
|
||||
{
|
||||
#ifdef Q_OS_LINUX
|
||||
if (framebuffer != -1)
|
||||
|
|
@ -169,27 +185,27 @@ void QEGLDeviceIntegration::platformDestroy()
|
|||
#endif
|
||||
}
|
||||
|
||||
EGLNativeDisplayType QEGLDeviceIntegration::platformDisplay() const
|
||||
EGLNativeDisplayType QEglFSDeviceIntegration::platformDisplay() const
|
||||
{
|
||||
return EGL_DEFAULT_DISPLAY;
|
||||
}
|
||||
|
||||
EGLDisplay QEGLDeviceIntegration::createDisplay(EGLNativeDisplayType nativeDisplay)
|
||||
EGLDisplay QEglFSDeviceIntegration::createDisplay(EGLNativeDisplayType nativeDisplay)
|
||||
{
|
||||
return eglGetDisplay(nativeDisplay);
|
||||
}
|
||||
|
||||
bool QEGLDeviceIntegration::usesDefaultScreen()
|
||||
bool QEglFSDeviceIntegration::usesDefaultScreen()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void QEGLDeviceIntegration::screenInit()
|
||||
void QEglFSDeviceIntegration::screenInit()
|
||||
{
|
||||
// Nothing to do here. Called only when usesDefaultScreen is false.
|
||||
}
|
||||
|
||||
void QEGLDeviceIntegration::screenDestroy()
|
||||
void QEglFSDeviceIntegration::screenDestroy()
|
||||
{
|
||||
QGuiApplication *app = qGuiApp;
|
||||
QEglFSIntegration *platformIntegration = static_cast<QEglFSIntegration *>(
|
||||
|
|
@ -198,17 +214,17 @@ void QEGLDeviceIntegration::screenDestroy()
|
|||
platformIntegration->removeScreen(app->screens().last()->handle());
|
||||
}
|
||||
|
||||
QSizeF QEGLDeviceIntegration::physicalScreenSize() const
|
||||
QSizeF QEglFSDeviceIntegration::physicalScreenSize() const
|
||||
{
|
||||
return q_physicalScreenSizeFromFb(framebuffer, screenSize());
|
||||
}
|
||||
|
||||
QSize QEGLDeviceIntegration::screenSize() const
|
||||
QSize QEglFSDeviceIntegration::screenSize() const
|
||||
{
|
||||
return q_screenSizeFromFb(framebuffer);
|
||||
}
|
||||
|
||||
QDpi QEGLDeviceIntegration::logicalDpi() const
|
||||
QDpi QEglFSDeviceIntegration::logicalDpi() const
|
||||
{
|
||||
const QSizeF ps = physicalScreenSize();
|
||||
const QSize s = screenSize();
|
||||
|
|
@ -220,42 +236,42 @@ QDpi QEGLDeviceIntegration::logicalDpi() const
|
|||
return QDpi(100, 100);
|
||||
}
|
||||
|
||||
qreal QEGLDeviceIntegration::pixelDensity() const
|
||||
qreal QEglFSDeviceIntegration::pixelDensity() const
|
||||
{
|
||||
return qRound(logicalDpi().first / qreal(100));
|
||||
}
|
||||
|
||||
Qt::ScreenOrientation QEGLDeviceIntegration::nativeOrientation() const
|
||||
Qt::ScreenOrientation QEglFSDeviceIntegration::nativeOrientation() const
|
||||
{
|
||||
return Qt::PrimaryOrientation;
|
||||
}
|
||||
|
||||
Qt::ScreenOrientation QEGLDeviceIntegration::orientation() const
|
||||
Qt::ScreenOrientation QEglFSDeviceIntegration::orientation() const
|
||||
{
|
||||
return Qt::PrimaryOrientation;
|
||||
}
|
||||
|
||||
int QEGLDeviceIntegration::screenDepth() const
|
||||
int QEglFSDeviceIntegration::screenDepth() const
|
||||
{
|
||||
return q_screenDepthFromFb(framebuffer);
|
||||
}
|
||||
|
||||
QImage::Format QEGLDeviceIntegration::screenFormat() const
|
||||
QImage::Format QEglFSDeviceIntegration::screenFormat() const
|
||||
{
|
||||
return screenDepth() == 16 ? QImage::Format_RGB16 : QImage::Format_RGB32;
|
||||
}
|
||||
|
||||
qreal QEGLDeviceIntegration::refreshRate() const
|
||||
qreal QEglFSDeviceIntegration::refreshRate() const
|
||||
{
|
||||
return q_refreshRateFromFb(framebuffer);
|
||||
}
|
||||
|
||||
EGLint QEGLDeviceIntegration::surfaceType() const
|
||||
EGLint QEglFSDeviceIntegration::surfaceType() const
|
||||
{
|
||||
return EGL_WINDOW_BIT;
|
||||
}
|
||||
|
||||
QSurfaceFormat QEGLDeviceIntegration::surfaceFormatFor(const QSurfaceFormat &inputFormat) const
|
||||
QSurfaceFormat QEglFSDeviceIntegration::surfaceFormatFor(const QSurfaceFormat &inputFormat) const
|
||||
{
|
||||
QSurfaceFormat format = inputFormat;
|
||||
|
||||
|
|
@ -269,17 +285,17 @@ QSurfaceFormat QEGLDeviceIntegration::surfaceFormatFor(const QSurfaceFormat &inp
|
|||
return format;
|
||||
}
|
||||
|
||||
bool QEGLDeviceIntegration::filterConfig(EGLDisplay, EGLConfig) const
|
||||
bool QEglFSDeviceIntegration::filterConfig(EGLDisplay, EGLConfig) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
QEglFSWindow *QEGLDeviceIntegration::createWindow(QWindow *window) const
|
||||
QEglFSWindow *QEglFSDeviceIntegration::createWindow(QWindow *window) const
|
||||
{
|
||||
return new QEglFSWindow(window);
|
||||
}
|
||||
|
||||
EGLNativeWindowType QEGLDeviceIntegration::createNativeWindow(QPlatformWindow *platformWindow,
|
||||
EGLNativeWindowType QEglFSDeviceIntegration::createNativeWindow(QPlatformWindow *platformWindow,
|
||||
const QSize &size,
|
||||
const QSurfaceFormat &format)
|
||||
{
|
||||
|
|
@ -289,29 +305,29 @@ EGLNativeWindowType QEGLDeviceIntegration::createNativeWindow(QPlatformWindow *p
|
|||
return 0;
|
||||
}
|
||||
|
||||
EGLNativeWindowType QEGLDeviceIntegration::createNativeOffscreenWindow(const QSurfaceFormat &format)
|
||||
EGLNativeWindowType QEglFSDeviceIntegration::createNativeOffscreenWindow(const QSurfaceFormat &format)
|
||||
{
|
||||
Q_UNUSED(format);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void QEGLDeviceIntegration::destroyNativeWindow(EGLNativeWindowType window)
|
||||
void QEglFSDeviceIntegration::destroyNativeWindow(EGLNativeWindowType window)
|
||||
{
|
||||
Q_UNUSED(window);
|
||||
}
|
||||
|
||||
bool QEGLDeviceIntegration::hasCapability(QPlatformIntegration::Capability cap) const
|
||||
bool QEglFSDeviceIntegration::hasCapability(QPlatformIntegration::Capability cap) const
|
||||
{
|
||||
Q_UNUSED(cap);
|
||||
return false;
|
||||
}
|
||||
|
||||
QPlatformCursor *QEGLDeviceIntegration::createCursor(QPlatformScreen *screen) const
|
||||
QPlatformCursor *QEglFSDeviceIntegration::createCursor(QPlatformScreen *screen) const
|
||||
{
|
||||
return new QEglFSCursor(screen);
|
||||
}
|
||||
|
||||
void QEGLDeviceIntegration::waitForVSync(QPlatformSurface *surface) const
|
||||
void QEglFSDeviceIntegration::waitForVSync(QPlatformSurface *surface) const
|
||||
{
|
||||
Q_UNUSED(surface);
|
||||
|
||||
|
|
@ -325,24 +341,42 @@ void QEGLDeviceIntegration::waitForVSync(QPlatformSurface *surface) const
|
|||
#endif
|
||||
}
|
||||
|
||||
void QEGLDeviceIntegration::presentBuffer(QPlatformSurface *surface)
|
||||
void QEglFSDeviceIntegration::presentBuffer(QPlatformSurface *surface)
|
||||
{
|
||||
Q_UNUSED(surface);
|
||||
}
|
||||
|
||||
bool QEGLDeviceIntegration::supportsPBuffers() const
|
||||
bool QEglFSDeviceIntegration::supportsPBuffers() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool QEGLDeviceIntegration::supportsSurfacelessContexts() const
|
||||
bool QEglFSDeviceIntegration::supportsSurfacelessContexts() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void *QEGLDeviceIntegration::wlDisplay() const
|
||||
void *QEglFSDeviceIntegration::wlDisplay() const
|
||||
{
|
||||
return Q_NULLPTR;
|
||||
}
|
||||
|
||||
EGLConfig QEglFSDeviceIntegration::chooseConfig(EGLDisplay display, const QSurfaceFormat &format)
|
||||
{
|
||||
class Chooser : public QEglConfigChooser {
|
||||
public:
|
||||
Chooser(EGLDisplay display)
|
||||
: QEglConfigChooser(display) { }
|
||||
bool filterConfig(EGLConfig config) const Q_DECL_OVERRIDE {
|
||||
return qt_egl_device_integration()->filterConfig(display(), config)
|
||||
&& QEglConfigChooser::filterConfig(config);
|
||||
}
|
||||
};
|
||||
|
||||
Chooser chooser(display);
|
||||
chooser.setSurfaceType(qt_egl_device_integration()->surfaceType());
|
||||
chooser.setSurfaceFormat(format);
|
||||
return chooser.chooseConfig();
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
@ -63,12 +63,12 @@ QT_BEGIN_NAMESPACE
|
|||
class QPlatformSurface;
|
||||
class QEglFSWindow;
|
||||
|
||||
#define QEGLDeviceIntegrationFactoryInterface_iid "org.qt-project.qt.qpa.egl.QEGLDeviceIntegrationFactoryInterface.5.5"
|
||||
#define QEglFSDeviceIntegrationFactoryInterface_iid "org.qt-project.qt.qpa.egl.QEglFSDeviceIntegrationFactoryInterface.5.5"
|
||||
|
||||
class Q_EGLFS_EXPORT QEGLDeviceIntegration
|
||||
class Q_EGLFS_EXPORT QEglFSDeviceIntegration
|
||||
{
|
||||
public:
|
||||
virtual ~QEGLDeviceIntegration() { }
|
||||
virtual ~QEglFSDeviceIntegration() { }
|
||||
|
||||
virtual void platformInit();
|
||||
virtual void platformDestroy();
|
||||
|
|
@ -105,25 +105,27 @@ public:
|
|||
virtual bool supportsSurfacelessContexts() const;
|
||||
|
||||
virtual void *wlDisplay() const;
|
||||
|
||||
static EGLConfig chooseConfig(EGLDisplay display, const QSurfaceFormat &format);
|
||||
};
|
||||
|
||||
class Q_EGLFS_EXPORT QEGLDeviceIntegrationPlugin : public QObject
|
||||
class Q_EGLFS_EXPORT QEglFSDeviceIntegrationPlugin : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
virtual QEGLDeviceIntegration *create() = 0;
|
||||
virtual QEglFSDeviceIntegration *create() = 0;
|
||||
|
||||
// the pattern expected by qLoadPlugin calls for a QString argument.
|
||||
// we don't need it, so don't bother subclasses with it:
|
||||
QEGLDeviceIntegration *create(const QString &) { return create(); }
|
||||
QEglFSDeviceIntegration *create(const QString &) { return create(); }
|
||||
};
|
||||
|
||||
class Q_EGLFS_EXPORT QEGLDeviceIntegrationFactory
|
||||
class Q_EGLFS_EXPORT QEglFSDeviceIntegrationFactory
|
||||
{
|
||||
public:
|
||||
static QStringList keys(const QString &pluginPath = QString());
|
||||
static QEGLDeviceIntegration *create(const QString &name, const QString &platformPluginPath = QString());
|
||||
static QEglFSDeviceIntegration *create(const QString &name, const QString &platformPluginPath = QString());
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
@ -40,7 +40,11 @@
|
|||
#ifndef QEGLFSGLOBAL_H
|
||||
#define QEGLFSGLOBAL_H
|
||||
|
||||
#include <qglobal.h>
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
#include <EGL/egl.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#ifdef QT_BUILD_EGL_DEVICE_LIB
|
||||
#define Q_EGLFS_EXPORT Q_DECL_EXPORT
|
||||
|
|
@ -48,7 +52,6 @@
|
|||
#define Q_EGLFS_EXPORT Q_DECL_IMPORT
|
||||
#endif
|
||||
|
||||
#include <EGL/egl.h>
|
||||
#undef Status
|
||||
#undef None
|
||||
#undef Bool
|
||||
|
|
@ -61,4 +64,6 @@
|
|||
#undef Expose
|
||||
#undef Unsorted
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif
|
||||
|
|
@ -37,7 +37,7 @@
|
|||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qeglfshooks.h"
|
||||
#include "qeglfshooks_p.h"
|
||||
#include <QLoggingCategory>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
|
@ -46,7 +46,7 @@ Q_DECLARE_LOGGING_CATEGORY(qLcEglDevDebug)
|
|||
|
||||
#ifdef EGLFS_PLATFORM_HOOKS
|
||||
|
||||
QEGLDeviceIntegration *qt_egl_device_integration()
|
||||
QEglFSDeviceIntegration *qt_egl_device_integration()
|
||||
{
|
||||
extern QEglFSHooks *platformHooks;
|
||||
return platformHooks;
|
||||
|
|
@ -59,16 +59,16 @@ class DeviceIntegration
|
|||
public:
|
||||
DeviceIntegration();
|
||||
~DeviceIntegration() { delete m_integration; }
|
||||
QEGLDeviceIntegration *integration() { return m_integration; }
|
||||
QEglFSDeviceIntegration *integration() { return m_integration; }
|
||||
private:
|
||||
QEGLDeviceIntegration *m_integration;
|
||||
QEglFSDeviceIntegration *m_integration;
|
||||
};
|
||||
|
||||
Q_GLOBAL_STATIC(DeviceIntegration, deviceIntegration)
|
||||
|
||||
DeviceIntegration::DeviceIntegration() : m_integration(0)
|
||||
{
|
||||
QStringList pluginKeys = QEGLDeviceIntegrationFactory::keys();
|
||||
QStringList pluginKeys = QEglFSDeviceIntegrationFactory::keys();
|
||||
if (!pluginKeys.isEmpty()) {
|
||||
// Some built-in logic: Prioritize either X11 or KMS/DRM.
|
||||
if (qEnvironmentVariableIsSet("DISPLAY")) {
|
||||
|
|
@ -113,7 +113,7 @@ DeviceIntegration::DeviceIntegration() : m_integration(0)
|
|||
while (!m_integration && !pluginKeys.isEmpty()) {
|
||||
QString key = pluginKeys.takeFirst();
|
||||
qCDebug(qLcEglDevDebug) << "Trying to load device EGL integration" << key;
|
||||
m_integration = QEGLDeviceIntegrationFactory::create(key);
|
||||
m_integration = QEglFSDeviceIntegrationFactory::create(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -122,11 +122,11 @@ DeviceIntegration::DeviceIntegration() : m_integration(0)
|
|||
// Use a default, non-specialized device integration when no plugin is available.
|
||||
// For some systems this is sufficient.
|
||||
qCDebug(qLcEglDevDebug) << "Using base device integration";
|
||||
m_integration = new QEGLDeviceIntegration;
|
||||
m_integration = new QEglFSDeviceIntegration;
|
||||
}
|
||||
}
|
||||
|
||||
QEGLDeviceIntegration *qt_egl_device_integration()
|
||||
QEglFSDeviceIntegration *qt_egl_device_integration()
|
||||
{
|
||||
return deviceIntegration()->integration();
|
||||
}
|
||||
|
|
@ -40,16 +40,27 @@
|
|||
#ifndef QEGLFSHOOKS_H
|
||||
#define QEGLFSHOOKS_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 "qeglfsglobal.h"
|
||||
#include "qeglfsdeviceintegration.h"
|
||||
#include "qeglfsdeviceintegration_p.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QEglFSHooks : public QEGLDeviceIntegration
|
||||
class QEglFSHooks : public QEglFSDeviceIntegration
|
||||
{
|
||||
};
|
||||
|
||||
Q_EGLFS_EXPORT QEGLDeviceIntegration *qt_egl_device_integration();
|
||||
Q_EGLFS_EXPORT QEglFSDeviceIntegration *qt_egl_device_integration();
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
|
@ -43,9 +43,9 @@
|
|||
#include <qpa/qplatformcursor.h>
|
||||
#include <QtPlatformSupport/private/qopenglcompositor_p.h>
|
||||
|
||||
#include "qeglfsscreen.h"
|
||||
#include "qeglfswindow.h"
|
||||
#include "qeglfshooks.h"
|
||||
#include "qeglfsscreen_p.h"
|
||||
#include "qeglfswindow_p.h"
|
||||
#include "qeglfshooks_p.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
|
@ -40,9 +40,22 @@
|
|||
#ifndef QEGLFSSCREEN_H
|
||||
#define QEGLFSSCREEN_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 "qeglfsglobal.h"
|
||||
#include <QtCore/QPointer>
|
||||
|
||||
#include <qpa/qplatformscreen.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QEglFSWindow;
|
||||
|
|
@ -46,9 +46,10 @@
|
|||
#include <QtPlatformSupport/private/qeglconvenience_p.h>
|
||||
#include <QtPlatformSupport/private/qopenglcompositorbackingstore_p.h>
|
||||
|
||||
#include "qeglfswindow.h"
|
||||
#include "qeglfscursor.h"
|
||||
#include "qeglfshooks.h"
|
||||
#include "qeglfswindow_p.h"
|
||||
#include "qeglfscursor_p.h"
|
||||
#include "qeglfshooks_p.h"
|
||||
#include "qeglfsdeviceintegration_p.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
|
@ -186,7 +187,7 @@ void QEglFSWindow::resetSurface()
|
|||
EGLDisplay display = screen()->display();
|
||||
QSurfaceFormat platformFormat = qt_egl_device_integration()->surfaceFormatFor(window()->requestedFormat());
|
||||
|
||||
m_config = QEglFSIntegration::chooseConfig(display, platformFormat);
|
||||
m_config = QEglFSDeviceIntegration::chooseConfig(display, platformFormat);
|
||||
m_format = q_glFormatFromConfig(display, m_config, platformFormat);
|
||||
m_window = qt_egl_device_integration()->createNativeWindow(this, screen()->geometry().size(), m_format);
|
||||
m_surface = eglCreateWindowSurface(display, m_config, m_window, NULL);
|
||||
|
|
@ -40,9 +40,20 @@
|
|||
#ifndef QEGLFSWINDOW_H
|
||||
#define QEGLFSWINDOW_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 "qeglfsglobal.h"
|
||||
#include "qeglfsintegration.h"
|
||||
#include "qeglfsscreen.h"
|
||||
#include "qeglfsscreen_p.h"
|
||||
|
||||
#include <qpa/qplatformwindow.h>
|
||||
#include <QtPlatformSupport/private/qopenglcompositor_p.h>
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
TARGET = qeglfs-brcm-integration
|
||||
|
||||
QT += core-private gui-private platformsupport-private eglfs_device_lib-private
|
||||
QT += core-private gui-private platformsupport-private eglfsdeviceintegration-private
|
||||
|
||||
INCLUDEPATH += $$PWD/../..
|
||||
CONFIG += egl
|
||||
|
|
|
|||
|
|
@ -40,11 +40,11 @@
|
|||
#ifndef QEGLFSBRCMINTEGRATION_H
|
||||
#define QEGLFSBRCMINTEGRATION_H
|
||||
|
||||
#include "qeglfsdeviceintegration.h"
|
||||
#include "private/qeglfsdeviceintegration_p.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QEglFSBrcmIntegration : public QEGLDeviceIntegration
|
||||
class QEglFSBrcmIntegration : public QEglFSDeviceIntegration
|
||||
{
|
||||
public:
|
||||
void platformInit() Q_DECL_OVERRIDE;
|
||||
|
|
|
|||
|
|
@ -37,18 +37,18 @@
|
|||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qeglfsdeviceintegration.h"
|
||||
#include "private/qeglfsdeviceintegration_p.h"
|
||||
#include "qeglfsbrcmintegration.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QEglFSBrcmIntegrationPlugin : public QEGLDeviceIntegrationPlugin
|
||||
class QEglFSBrcmIntegrationPlugin : public QEglFSDeviceIntegrationPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID QEGLDeviceIntegrationFactoryInterface_iid FILE "eglfs_brcm.json")
|
||||
Q_PLUGIN_METADATA(IID QEglFSDeviceIntegrationFactoryInterface_iid FILE "eglfs_brcm.json")
|
||||
|
||||
public:
|
||||
QEGLDeviceIntegration *create() Q_DECL_OVERRIDE { return new QEglFSBrcmIntegration; }
|
||||
QEglFSDeviceIntegration *create() Q_DECL_OVERRIDE { return new QEglFSBrcmIntegration; }
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ PLUGIN_TYPE = egldeviceintegrations
|
|||
PLUGIN_CLASS_NAME = QEglFSKmsGbmIntegrationPlugin
|
||||
load(qt_plugin)
|
||||
|
||||
QT += core-private gui-private platformsupport-private eglfs_device_lib-private eglfs_kms_support-private
|
||||
QT += core-private gui-private platformsupport-private eglfsdeviceintegration-private eglfs_kms_support-private
|
||||
|
||||
INCLUDEPATH += $$PWD/../.. $$PWD/../eglfs_kms_support
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
#include "qeglfskmsgbmdevice.h"
|
||||
#include "qeglfskmsgbmscreen.h"
|
||||
#include "qeglfskmsgbmcursor.h"
|
||||
#include "qeglfscursor.h"
|
||||
#include "private/qeglfscursor_p.h"
|
||||
|
||||
#include <QtPlatformSupport/private/qdevicediscovery_p.h>
|
||||
#include <QtCore/QLoggingCategory>
|
||||
|
|
|
|||
|
|
@ -38,18 +38,18 @@
|
|||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qeglfsdeviceintegration.h"
|
||||
#include "private/qeglfsdeviceintegration_p.h"
|
||||
#include "qeglfskmsgbmintegration.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QEglFSKmsGbmIntegrationPlugin : public QEGLDeviceIntegrationPlugin
|
||||
class QEglFSKmsGbmIntegrationPlugin : public QEglFSDeviceIntegrationPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID QEGLDeviceIntegrationFactoryInterface_iid FILE "eglfs_kms.json")
|
||||
Q_PLUGIN_METADATA(IID QEglFSDeviceIntegrationFactoryInterface_iid FILE "eglfs_kms.json")
|
||||
|
||||
public:
|
||||
QEGLDeviceIntegration *create() Q_DECL_OVERRIDE { return new QEglFSKmsGbmIntegration; }
|
||||
QEglFSDeviceIntegration *create() Q_DECL_OVERRIDE { return new QEglFSKmsGbmIntegration; }
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
TARGET = qeglfs-kms-egldevice-integration
|
||||
|
||||
QT += core-private gui-private platformsupport-private eglfs_device_lib-private eglfs_kms_support-private
|
||||
QT += core-private gui-private platformsupport-private eglfsdeviceintegration-private_kms_support-private
|
||||
|
||||
INCLUDEPATH += $$PWD/../.. $$PWD/../eglfs_kms_support
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
#include "qeglfskmsegldeviceintegration.h"
|
||||
#include <QtPlatformSupport/private/qeglconvenience_p.h>
|
||||
#include "qeglfswindow.h"
|
||||
#include "private/qeglfswindow_p.h"
|
||||
#include "qeglfskmsegldevice.h"
|
||||
#include "qeglfskmsscreen.h"
|
||||
#include <QLoggingCategory>
|
||||
|
|
@ -189,7 +189,7 @@ void QEglJetsonTK1Window::resetSurface()
|
|||
if (!m_integration->m_funcs->stream_consumer_output(display, m_egl_stream, layer))
|
||||
qWarning("resetSurface: Unable to connect stream");
|
||||
|
||||
m_config = QEglFSIntegration::chooseConfig(display, m_integration->surfaceFormatFor(window()->requestedFormat()));
|
||||
m_config = QEglFSDeviceIntegration::chooseConfig(display, m_integration->surfaceFormatFor(window()->requestedFormat()));
|
||||
m_format = q_glFormatFromConfig(display, m_config);
|
||||
qCDebug(qLcEglfsKmsDebug) << "Stream producer format is" << m_format;
|
||||
|
||||
|
|
|
|||
|
|
@ -41,13 +41,13 @@
|
|||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QEglFSKmsEglDeviceIntegrationPlugin : public QEGLDeviceIntegrationPlugin
|
||||
class QEglFSKmsEglDeviceIntegrationPlugin : public QEglFSDeviceIntegrationPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID QEGLDeviceIntegrationFactoryInterface_iid FILE "eglfs_kms_egldevice.json")
|
||||
Q_PLUGIN_METADATA(IID QEglFSDeviceIntegrationFactoryInterface_iid FILE "eglfs_kms_egldevice.json")
|
||||
|
||||
public:
|
||||
QEGLDeviceIntegration *create() Q_DECL_OVERRIDE { return new QEglFSKmsEglDeviceIntegration; }
|
||||
QEglFSDeviceIntegration *create() Q_DECL_OVERRIDE { return new QEglFSKmsEglDeviceIntegration; }
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ TARGET = QtEglFsKmsSupport
|
|||
CONFIG += no_module_headers internal_module
|
||||
load(qt_module)
|
||||
|
||||
QT += core-private gui-private platformsupport-private eglfs_device_lib-private
|
||||
QT += core-private gui-private platformsupport-private eglfsdeviceintegration-private
|
||||
|
||||
INCLUDEPATH += $$PWD/../..
|
||||
|
||||
|
|
|
|||
|
|
@ -42,8 +42,8 @@
|
|||
#include "qeglfskmsintegration.h"
|
||||
#include "qeglfskmsdevice.h"
|
||||
#include "qeglfskmsscreen.h"
|
||||
#include "qeglfswindow.h"
|
||||
#include "qeglfscursor.h"
|
||||
#include "private/qeglfswindow_p.h"
|
||||
#include "private/qeglfscursor_p.h"
|
||||
|
||||
#include <QtPlatformSupport/private/qeglconvenience_p.h>
|
||||
#include <QtCore/QJsonDocument>
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
#ifndef QEGLFSKMSINTEGRATION_H
|
||||
#define QEGLFSKMSINTEGRATION_H
|
||||
|
||||
#include "qeglfsdeviceintegration.h"
|
||||
#include "private/qeglfsdeviceintegration_p.h"
|
||||
#include <QtCore/QMap>
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtCore/QLoggingCategory>
|
||||
|
|
@ -53,7 +53,7 @@ class QEglFSKmsDevice;
|
|||
|
||||
Q_EGLFS_EXPORT Q_DECLARE_LOGGING_CATEGORY(qLcEglfsKmsDebug)
|
||||
|
||||
class Q_EGLFS_EXPORT QEglFSKmsIntegration : public QEGLDeviceIntegration
|
||||
class Q_EGLFS_EXPORT QEglFSKmsIntegration : public QEglFSDeviceIntegration
|
||||
{
|
||||
public:
|
||||
QEglFSKmsIntegration();
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
#define QEGLFSKMSSCREEN_H
|
||||
|
||||
#include "qeglfskmsintegration.h"
|
||||
#include "qeglfsscreen.h"
|
||||
#include "private/qeglfsscreen_p.h"
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QMutex>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
TARGET = qeglfs-mali-integration
|
||||
|
||||
QT += core-private gui-private platformsupport-private eglfs_device_lib-private
|
||||
QT += core-private gui-private platformsupport-private eglfsdeviceintegration-private
|
||||
|
||||
# Avoid X11 header collision
|
||||
DEFINES += MESA_EGL_NO_X11_HEADERS
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ struct fbdev_window {
|
|||
void QEglFSMaliIntegration::platformInit()
|
||||
{
|
||||
// Keep the non-overridden base class functions based on fb0 working.
|
||||
QEGLDeviceIntegration::platformInit();
|
||||
QEglFSDeviceIntegration::platformInit();
|
||||
|
||||
int fd = qt_safe_open("/dev/fb0", O_RDWR, 0);
|
||||
if (fd == -1)
|
||||
|
|
|
|||
|
|
@ -40,11 +40,11 @@
|
|||
#ifndef QEGLFSMALIINTEGRATION_H
|
||||
#define QEGLFSMALIINTEGRATION_H
|
||||
|
||||
#include "qeglfsdeviceintegration.h"
|
||||
#include "private/qeglfsdeviceintegration_p.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QEglFSMaliIntegration : public QEGLDeviceIntegration
|
||||
class QEglFSMaliIntegration : public QEglFSDeviceIntegration
|
||||
{
|
||||
public:
|
||||
void platformInit() Q_DECL_OVERRIDE;
|
||||
|
|
|
|||
|
|
@ -37,18 +37,18 @@
|
|||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qeglfsdeviceintegration.h"
|
||||
#include "private/qeglfsdeviceintegration_p.h"
|
||||
#include "qeglfsmaliintegration.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QEglFSMaliIntegrationPlugin : public QEGLDeviceIntegrationPlugin
|
||||
class QEglFSMaliIntegrationPlugin : public QEglFSDeviceIntegrationPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID QEGLDeviceIntegrationFactoryInterface_iid FILE "eglfs_mali.json")
|
||||
Q_PLUGIN_METADATA(IID QEglFSDeviceIntegrationFactoryInterface_iid FILE "eglfs_mali.json")
|
||||
|
||||
public:
|
||||
QEGLDeviceIntegration *create() Q_DECL_OVERRIDE { return new QEglFSMaliIntegration; }
|
||||
QEglFSDeviceIntegration *create() Q_DECL_OVERRIDE { return new QEglFSMaliIntegration; }
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
TARGET = qeglfs-viv-integration
|
||||
|
||||
QT += core-private gui-private platformsupport-private eglfs_device_lib-private
|
||||
QT += core-private gui-private platformsupport-private eglfsdeviceintegration-private
|
||||
|
||||
INCLUDEPATH += $$PWD/../..
|
||||
CONFIG += egl
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ QT_BEGIN_NAMESPACE
|
|||
|
||||
void QEglFSVivIntegration::platformInit()
|
||||
{
|
||||
QEGLDeviceIntegration::platformInit();
|
||||
QEglFSDeviceIntegration::platformInit();
|
||||
|
||||
int width, height;
|
||||
|
||||
|
|
|
|||
|
|
@ -40,11 +40,11 @@
|
|||
#ifndef QEGLFSVIVINTEGRATION_H
|
||||
#define QEGLFSVIVINTEGRATION_H
|
||||
|
||||
#include "qeglfsdeviceintegration.h"
|
||||
#include "private/qeglfsdeviceintegration_p.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QEglFSVivIntegration : public QEGLDeviceIntegration
|
||||
class QEglFSVivIntegration : public QEglFSDeviceIntegration
|
||||
{
|
||||
public:
|
||||
void platformInit() Q_DECL_OVERRIDE;
|
||||
|
|
|
|||
|
|
@ -37,18 +37,18 @@
|
|||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qeglfsdeviceintegration.h"
|
||||
#include "private/qeglfsdeviceintegration_p.h"
|
||||
#include "qeglfsvivintegration.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QEglFSVivIntegrationPlugin : public QEGLDeviceIntegrationPlugin
|
||||
class QEglFSVivIntegrationPlugin : public QEglFSDeviceIntegrationPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID QEGLDeviceIntegrationFactoryInterface_iid FILE "eglfs_viv.json")
|
||||
Q_PLUGIN_METADATA(IID QEglFSDeviceIntegrationFactoryInterface_iid FILE "eglfs_viv.json")
|
||||
|
||||
public:
|
||||
QEGLDeviceIntegration *create() Q_DECL_OVERRIDE { return new QEglFSVivIntegration; }
|
||||
QEglFSDeviceIntegration *create() Q_DECL_OVERRIDE { return new QEglFSVivIntegration; }
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
TARGET = qeglfs-viv-wl-integration
|
||||
|
||||
QT += core-private gui-private platformsupport-private eglfs_device_lib-private
|
||||
QT += core-private gui-private platformsupport-private eglfsdeviceintegration-private
|
||||
|
||||
INCLUDEPATH += $$PWD/../..
|
||||
CONFIG += egl
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE
|
|||
|
||||
void QEglFSVivWaylandIntegration::platformInit()
|
||||
{
|
||||
QEGLDeviceIntegration::platformInit();
|
||||
QEglFSDeviceIntegration::platformInit();
|
||||
|
||||
int width, height;
|
||||
|
||||
|
|
|
|||
|
|
@ -40,12 +40,12 @@
|
|||
#ifndef QEGLFSVIVINTEGRATION_H
|
||||
#define QEGLFSVIVINTEGRATION_H
|
||||
|
||||
#include "qeglfsdeviceintegration.h"
|
||||
#include "private/qeglfsdeviceintegration_p.h"
|
||||
struct wl_display;
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QEglFSVivWaylandIntegration : public QEGLDeviceIntegration
|
||||
class QEglFSVivWaylandIntegration : public QEglFSDeviceIntegration
|
||||
{
|
||||
public:
|
||||
void platformInit() Q_DECL_OVERRIDE;
|
||||
|
|
|
|||
|
|
@ -37,18 +37,18 @@
|
|||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qeglfsdeviceintegration.h"
|
||||
#include "private/qeglfsdeviceintegration_p.h"
|
||||
#include "qeglfsvivwlintegration.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QEglFSVivWaylandIntegrationPlugin : public QEGLDeviceIntegrationPlugin
|
||||
class QEglFSVivWaylandIntegrationPlugin : public QEglFSDeviceIntegrationPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID QEGLDeviceIntegrationFactoryInterface_iid FILE "eglfs_viv_wl.json")
|
||||
Q_PLUGIN_METADATA(IID QEglFSDeviceIntegrationFactoryInterface_iid FILE "eglfs_viv_wl.json")
|
||||
|
||||
public:
|
||||
QEGLDeviceIntegration *create() Q_DECL_OVERRIDE { return new QEglFSVivWaylandIntegration; }
|
||||
QEglFSDeviceIntegration *create() Q_DECL_OVERRIDE { return new QEglFSVivWaylandIntegration; }
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
TARGET = qeglfs-x11-integration
|
||||
|
||||
QT += core-private gui-private platformsupport-private eglfs_device_lib-private
|
||||
QT += core-private gui-private platformsupport-private eglfsdeviceintegration-private
|
||||
|
||||
# Avoid X11 header collision
|
||||
DEFINES += MESA_EGL_NO_X11_HEADERS
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
#ifndef QEGLFSX11INTEGRATION_H
|
||||
#define QEGLFSX11INTEGRATION_H
|
||||
|
||||
#include "qeglfsdeviceintegration.h"
|
||||
#include "private/qeglfsdeviceintegration_p.h"
|
||||
|
||||
#include <qpa/qwindowsysteminterface.h>
|
||||
#include <qpa/qplatformwindow.h>
|
||||
|
|
@ -64,7 +64,7 @@ namespace Atoms {
|
|||
|
||||
class EventReader;
|
||||
|
||||
class QEglFSX11Integration : public QEGLDeviceIntegration
|
||||
class QEglFSX11Integration : public QEglFSDeviceIntegration
|
||||
{
|
||||
public:
|
||||
QEglFSX11Integration() : m_connection(0), m_window(0), m_eventReader(0) {}
|
||||
|
|
|
|||
|
|
@ -37,18 +37,18 @@
|
|||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qeglfsdeviceintegration.h"
|
||||
#include "private/qeglfsdeviceintegration_p.h"
|
||||
#include "qeglfsx11integration.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QEglFSX11IntegrationPlugin : public QEGLDeviceIntegrationPlugin
|
||||
class QEglFSX11IntegrationPlugin : public QEglFSDeviceIntegrationPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID QEGLDeviceIntegrationFactoryInterface_iid FILE "eglfs_x11.json")
|
||||
Q_PLUGIN_METADATA(IID QEglFSDeviceIntegrationFactoryInterface_iid FILE "eglfs_x11.json")
|
||||
|
||||
public:
|
||||
QEGLDeviceIntegration *create() Q_DECL_OVERRIDE { return new QEglFSX11Integration; }
|
||||
QEglFSDeviceIntegration *create() Q_DECL_OVERRIDE { return new QEglFSX11Integration; }
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
TARGET = qeglfs
|
||||
|
||||
QT += platformsupport-private eglfs_device_lib-private
|
||||
QT += platformsupport-private eglfsdeviceintegration-private
|
||||
|
||||
SOURCES += $$PWD/qeglfsmain.cpp
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
TEMPLATE = subdirs
|
||||
CONFIG += ordered
|
||||
|
||||
SUBDIRS += eglfs_device_lib.pro
|
||||
SUBDIRS += eglfsdeviceintegration.pro
|
||||
SUBDIRS += eglfs-plugin.pro
|
||||
SUBDIRS += deviceintegration
|
||||
|
|
|
|||
|
|
@ -3,8 +3,9 @@
|
|||
# have to keep the QObject magic like qobject_cast working.
|
||||
# Hence this header-less, private-only module.
|
||||
|
||||
TARGET = QtEglDeviceIntegration
|
||||
CONFIG += no_module_headers internal_module
|
||||
TARGET = QtEglFSDeviceIntegration
|
||||
CONFIG += internal_module
|
||||
MODULE = eglfsdeviceintegration
|
||||
|
||||
QT += core-private gui-private platformsupport-private
|
||||
LIBS += $$QMAKE_LIBS_DYNLOAD
|
||||
|
|
@ -15,22 +16,14 @@ DEFINES += MESA_EGL_NO_X11_HEADERS
|
|||
DEFINES += QT_BUILD_EGL_DEVICE_LIB
|
||||
|
||||
SOURCES += $$PWD/qeglfsintegration.cpp \
|
||||
$$PWD/qeglfswindow.cpp \
|
||||
$$PWD/qeglfsscreen.cpp \
|
||||
$$PWD/qeglfscursor.cpp \
|
||||
$$PWD/qeglfshooks.cpp \
|
||||
$$PWD/qeglfscontext.cpp \
|
||||
$$PWD/qeglfsoffscreenwindow.cpp \
|
||||
$$PWD/qeglfsdeviceintegration.cpp
|
||||
|
||||
HEADERS += $$PWD/qeglfsintegration.h \
|
||||
$$PWD/qeglfswindow.h \
|
||||
$$PWD/qeglfsscreen.h \
|
||||
$$PWD/qeglfscursor.h \
|
||||
$$PWD/qeglfshooks.h \
|
||||
$$PWD/qeglfscontext.h \
|
||||
$$PWD/qeglfsoffscreenwindow.h \
|
||||
$$PWD/qeglfsdeviceintegration.h
|
||||
|
||||
include($$PWD/api/api.pri)
|
||||
|
||||
QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF
|
||||
|
||||
|
|
@ -43,9 +43,9 @@
|
|||
#include <QtPlatformSupport/private/qeglpbuffer_p.h>
|
||||
|
||||
#include "qeglfscontext.h"
|
||||
#include "qeglfswindow.h"
|
||||
#include "qeglfshooks.h"
|
||||
#include "qeglfscursor.h"
|
||||
#include "qeglfswindow_p.h"
|
||||
#include "qeglfshooks_p.h"
|
||||
#include "qeglfscursor_p.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
|
|
|||
|
|
@ -52,11 +52,11 @@
|
|||
#include <private/qgenericunixthemes_p.h>
|
||||
|
||||
#include "qeglfsintegration.h"
|
||||
#include "qeglfswindow.h"
|
||||
#include "qeglfshooks.h"
|
||||
#include "qeglfswindow_p.h"
|
||||
#include "qeglfshooks_p.h"
|
||||
#include "qeglfscontext.h"
|
||||
#include "qeglfsoffscreenwindow.h"
|
||||
#include "qeglfscursor.h"
|
||||
#include "qeglfscursor_p.h"
|
||||
|
||||
#include <QtPlatformSupport/private/qeglconvenience_p.h>
|
||||
#include <QtPlatformSupport/private/qeglplatformcontext_p.h>
|
||||
|
|
@ -205,7 +205,7 @@ QPlatformOpenGLContext *QEglFSIntegration::createPlatformOpenGLContext(QOpenGLCo
|
|||
QEglFSContext *ctx;
|
||||
QSurfaceFormat adjustedFormat = qt_egl_device_integration()->surfaceFormatFor(context->format());
|
||||
if (nativeHandle.isNull()) {
|
||||
EGLConfig config = QEglFSIntegration::chooseConfig(dpy, adjustedFormat);
|
||||
EGLConfig config = QEglFSDeviceIntegration::chooseConfig(dpy, adjustedFormat);
|
||||
ctx = new QEglFSContext(adjustedFormat, share, dpy, &config, QVariant());
|
||||
} else {
|
||||
ctx = new QEglFSContext(adjustedFormat, share, dpy, 0, nativeHandle);
|
||||
|
|
@ -436,22 +436,4 @@ EGLNativeDisplayType QEglFSIntegration::nativeDisplay() const
|
|||
return qt_egl_device_integration()->platformDisplay();
|
||||
}
|
||||
|
||||
EGLConfig QEglFSIntegration::chooseConfig(EGLDisplay display, const QSurfaceFormat &format)
|
||||
{
|
||||
class Chooser : public QEglConfigChooser {
|
||||
public:
|
||||
Chooser(EGLDisplay display)
|
||||
: QEglConfigChooser(display) { }
|
||||
bool filterConfig(EGLConfig config) const Q_DECL_OVERRIDE {
|
||||
return qt_egl_device_integration()->filterConfig(display(), config)
|
||||
&& QEglConfigChooser::filterConfig(config);
|
||||
}
|
||||
};
|
||||
|
||||
Chooser chooser(display);
|
||||
chooser.setSurfaceType(qt_egl_device_integration()->surfaceType());
|
||||
chooser.setSurfaceFormat(format);
|
||||
return chooser.chooseConfig();
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -92,8 +92,6 @@ public:
|
|||
void addScreen(QPlatformScreen *screen);
|
||||
void removeScreen(QPlatformScreen *screen);
|
||||
|
||||
static EGLConfig chooseConfig(EGLDisplay display, const QSurfaceFormat &format);
|
||||
|
||||
private:
|
||||
EGLNativeDisplayType nativeDisplay() const;
|
||||
void createInputHandlers();
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
****************************************************************************/
|
||||
|
||||
#include "qeglfsoffscreenwindow.h"
|
||||
#include "qeglfshooks.h"
|
||||
#include "qeglfshooks_p.h"
|
||||
#include <QtGui/QOffscreenSurface>
|
||||
#include <QtPlatformSupport/private/qeglconvenience_p.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -18,8 +18,10 @@
|
|||
"QtANGLE/EGL" => "!$basedir/src/3rdparty/angle/include/EGL",
|
||||
"QtZlib" => "!>$basedir/src/corelib;$basedir/src/3rdparty/zlib",
|
||||
"QtOpenGLExtensions" => "$basedir/src/openglextensions",
|
||||
"QtEglFSDeviceIntegration" => "$basedir/src/plugins/platforms/eglfs",
|
||||
);
|
||||
%moduleheaders = ( # restrict the module headers to those found in relative path
|
||||
"QtEglFSDeviceIntegration" => "api",
|
||||
);
|
||||
@allmoduleheadersprivate = (
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue