diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2011-11-27 20:42:22 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-12-02 00:08:32 +0100 |
commit | 6534898cc69e22115cf158f71a1e0edd7f13877b (patch) | |
tree | 32aa4982f28f47365dc84ff09094e8cd8c6d02b2 /src/plugins/platforms/directfb/qdirectfbintegration.cpp | |
parent | 614bb9c0851eb1fe21ff7a998191d551ceed6a22 (diff) |
directfb: Introduce EGL integration for DirectFB
Introduce a new platform called 'directfbegl' that allows platform
integration with EGL. Change the QDirectFbIntegration to make it more
easy to hook up in the creation process, introduce an EGL integration
with custom screen, window and EGL Platform Context.
Vendors might need to add custom code to initialize EGL to be used with
DirectFB, this can be done in QDirectFbScreenEGL::platformInit.
Change-Id: I7bee277ede27c72437cd7c5977fa6ed85e65f538
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Diffstat (limited to 'src/plugins/platforms/directfb/qdirectfbintegration.cpp')
-rw-r--r-- | src/plugins/platforms/directfb/qdirectfbintegration.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/plugins/platforms/directfb/qdirectfbintegration.cpp b/src/plugins/platforms/directfb/qdirectfbintegration.cpp index 73ea490110..b40e64e25a 100644 --- a/src/plugins/platforms/directfb/qdirectfbintegration.cpp +++ b/src/plugins/platforms/directfb/qdirectfbintegration.cpp @@ -64,7 +64,17 @@ QDirectFbIntegration::QDirectFbIntegration() , m_eventDispatcher(createUnixEventDispatcher()) { QGuiApplicationPrivate::instance()->setEventDispatcher(m_eventDispatcher); +} +void QDirectFbIntegration::initialize() +{ + initializeDirectFB(); + initializeScreen(); + initializeInput(); +} + +void QDirectFbIntegration::initializeDirectFB() +{ const QStringList args = QCoreApplication::arguments(); int argc = args.size(); char **argv = new char*[argc]; @@ -84,10 +94,16 @@ QDirectFbIntegration::QDirectFbIntegration() // This must happen after DirectFBInit. m_dfb.reset(QDirectFbConvenience::dfbInterface()); +} +void QDirectFbIntegration::initializeScreen() +{ m_primaryScreen.reset(new QDirectFbScreen(0)); screenAdded(m_primaryScreen.data()); +} +void QDirectFbIntegration::initializeInput() +{ m_input.reset(new QDirectFbInput(m_dfb.data(), m_primaryScreen->dfbLayer())); m_input->start(); } |