From 97f119af14d3cc1be24400a5e542d26fca96d36b Mon Sep 17 00:00:00 2001 From: Louai Al-Khanji Date: Thu, 18 Sep 2014 14:36:16 +0300 Subject: EGLFS: Add support for multiple displays Change-Id: Id039e0ed2d99562eb2a5cfe1e7b34013c75ff3ac Reviewed-by: Laszlo Agocs --- src/plugins/platforms/eglfs/qeglfshooks_stub.cpp | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'src/plugins/platforms/eglfs/qeglfshooks_stub.cpp') 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 #include #include +#include #if defined(Q_OS_LINUX) #include @@ -94,6 +98,18 @@ EGLNativeDisplayType QEglFSHooks::platformDisplay() const return EGL_DEFAULT_DISPLAY; } +void QEglFSHooks::screenInit() +{ + QEglFSIntegration *integration = static_cast(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 -- cgit v1.2.3