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 --- .../eglconvenience/qeglplatformintegration.cpp | 13 +++---------- .../eglconvenience/qeglplatformintegration_p.h | 4 ---- 2 files changed, 3 insertions(+), 14 deletions(-) (limited to 'src/platformsupport') diff --git a/src/platformsupport/eglconvenience/qeglplatformintegration.cpp b/src/platformsupport/eglconvenience/qeglplatformintegration.cpp index fa1ec9e1be..a9f0c0f448 100644 --- a/src/platformsupport/eglconvenience/qeglplatformintegration.cpp +++ b/src/platformsupport/eglconvenience/qeglplatformintegration.cpp @@ -84,8 +84,7 @@ QT_BEGIN_NAMESPACE */ QEGLPlatformIntegration::QEGLPlatformIntegration() - : m_screen(0), - m_display(EGL_NO_DISPLAY), + : m_display(EGL_NO_DISPLAY), m_inputContext(0), m_fontDb(new QGenericUnixFontDatabase), m_services(new QGenericUnixServices), @@ -95,7 +94,6 @@ QEGLPlatformIntegration::QEGLPlatformIntegration() QEGLPlatformIntegration::~QEGLPlatformIntegration() { - } void QEGLPlatformIntegration::initialize() @@ -108,9 +106,6 @@ void QEGLPlatformIntegration::initialize() if (!eglInitialize(m_display, &major, &minor)) qFatal("Could not initialize egl display"); - m_screen = createScreen(); - screenAdded(m_screen); - m_inputContext = QPlatformInputContextFactory::create(); m_vtHandler.reset(new QFbVtHandler); @@ -121,8 +116,6 @@ void QEGLPlatformIntegration::destroy() foreach (QWindow *w, qGuiApp->topLevelWindows()) w->destroy(); - delete m_screen; - if (m_display != EGL_NO_DISPLAY) eglTerminate(m_display); } @@ -228,7 +221,7 @@ void *QEGLPlatformIntegration::nativeResourceForIntegration(const QByteArray &re switch (resourceType(resource)) { case EglDisplay: - result = m_screen->display(); + result = display(); break; case NativeDisplay: result = reinterpret_cast(nativeDisplay()); @@ -266,7 +259,7 @@ void *QEGLPlatformIntegration::nativeResourceForWindow(const QByteArray &resourc if (window && window->handle()) result = static_cast(window->handle()->screen())->display(); else - result = m_screen->display(); + result = display(); break; case EglWindow: if (window && window->handle()) diff --git a/src/platformsupport/eglconvenience/qeglplatformintegration_p.h b/src/platformsupport/eglconvenience/qeglplatformintegration_p.h index 2080ff0352..7f0037db92 100644 --- a/src/platformsupport/eglconvenience/qeglplatformintegration_p.h +++ b/src/platformsupport/eglconvenience/qeglplatformintegration_p.h @@ -52,7 +52,6 @@ QT_BEGIN_NAMESPACE -class QEGLPlatformScreen; class QEGLPlatformWindow; class QEGLPlatformContext; class QFbVtHandler; @@ -67,7 +66,6 @@ public: void initialize() Q_DECL_OVERRIDE; void destroy() Q_DECL_OVERRIDE; - QEGLPlatformScreen *screen() const { return m_screen; } EGLDisplay display() const { return m_display; } QAbstractEventDispatcher *createEventDispatcher() const Q_DECL_OVERRIDE; @@ -93,7 +91,6 @@ public: QFunctionPointer platformFunction(const QByteArray &function) const Q_DECL_OVERRIDE; protected: - virtual QEGLPlatformScreen *createScreen() const = 0; virtual QEGLPlatformWindow *createWindow(QWindow *window) const = 0; virtual QEGLPlatformContext *createContext(const QSurfaceFormat &format, QPlatformOpenGLContext *shareContext, @@ -110,7 +107,6 @@ protected: private: static void loadKeymapStatic(const QString &filename); - QEGLPlatformScreen *m_screen; EGLDisplay m_display; QPlatformInputContext *m_inputContext; QScopedPointer m_fontDb; -- cgit v1.2.3