diff options
author | Louai Al-Khanji <louai.al-khanji@digia.com> | 2014-09-18 14:36:16 +0300 |
---|---|---|
committer | Louai Al-Khanji <louai.al-khanji@digia.com> | 2014-10-10 13:25:53 +0200 |
commit | 97f119af14d3cc1be24400a5e542d26fca96d36b (patch) | |
tree | e7218e6e386f1d3ce59c6eb4595aceb87229bdce /src/plugins/platforms/eglfs/qeglfshooks_stub.cpp | |
parent | 7069ebd1f66e624e69b980619112b692ed40efe4 (diff) |
EGLFS: Add support for multiple displays
Change-Id: Id039e0ed2d99562eb2a5cfe1e7b34013c75ff3ac
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Diffstat (limited to 'src/plugins/platforms/eglfs/qeglfshooks_stub.cpp')
-rw-r--r-- | src/plugins/platforms/eglfs/qeglfshooks_stub.cpp | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp b/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp index 04acc4c759..ddf19face6 100644 --- a/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp +++ b/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp @@ -32,9 +32,13 @@ ****************************************************************************/ #include "qeglfshooks.h" +#include "qeglfsintegration.h" +#include "qeglfsscreen.h" + #include <QtPlatformSupport/private/qeglplatformcursor_p.h> #include <QtPlatformSupport/private/qeglconvenience_p.h> #include <QtCore/QRegularExpression> +#include <QtGui/private/qguiapplication_p.h> #if defined(Q_OS_LINUX) #include <fcntl.h> @@ -94,6 +98,18 @@ EGLNativeDisplayType QEglFSHooks::platformDisplay() const return EGL_DEFAULT_DISPLAY; } +void QEglFSHooks::screenInit() +{ + QEglFSIntegration *integration = static_cast<QEglFSIntegration *>(QGuiApplicationPrivate::platformIntegration()); + integration->addScreen(new QEglFSScreen(integration->display())); +} + +void QEglFSHooks::screenDestroy() +{ + while (!qApp->screens().isEmpty()) + delete qApp->screens().last()->handle(); +} + QSizeF QEglFSHooks::physicalScreenSize() const { return q_physicalScreenSizeFromFb(framebuffer, screenSize()); @@ -184,8 +200,10 @@ QPlatformCursor *QEglFSHooks::createCursor(QPlatformScreen *screen) const return new QEGLPlatformCursor(screen); } -void QEglFSHooks::waitForVSync() const +void QEglFSHooks::waitForVSync(QPlatformSurface *surface) const { + Q_UNUSED(surface); + #if defined(FBIO_WAITFORVSYNC) static const bool forceSync = qEnvironmentVariableIntValue("QT_QPA_EGLFS_FORCEVSYNC"); if (forceSync && framebuffer != -1) { @@ -196,8 +214,9 @@ void QEglFSHooks::waitForVSync() const #endif } -void QEglFSHooks::presentBuffer() +void QEglFSHooks::presentBuffer(QPlatformSurface *surface) { + Q_UNUSED(surface); } bool QEglFSHooks::supportsPBuffers() const |