diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2011-12-05 22:30:32 +0800 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-12-06 20:14:10 +0100 |
commit | f091eccf9124f951fc41cfaa6b4be68e7379a5d6 (patch) | |
tree | 39543dc0c7e68a9887affa1cb79553d0aea62929 /src/plugins | |
parent | e68642fe1003467f1483dd8ddb2528cd3136042e (diff) |
directfbegl: Add unimplemented QDirectFbWindow::eglSurface, build fix
QDirectFbScreen needs to have the full QDirectFbCursor definition, include
the header file directly instead of a forward declaration.
Impelement QDirectFbWindowEGL::eglSurface to return the EGLSurface of the
underlying DirectFBWindow.
Change-Id: Ib6765331ffea6e0b5f10f738d9e05320b7f8155f
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/platforms/directfb/qdirectfb_egl.cpp | 15 | ||||
-rw-r--r-- | src/plugins/platforms/directfb/qdirectfbscreen.h | 2 |
2 files changed, 16 insertions, 1 deletions
diff --git a/src/plugins/platforms/directfb/qdirectfb_egl.cpp b/src/plugins/platforms/directfb/qdirectfb_egl.cpp index 399e90a9fb..958a3be5e3 100644 --- a/src/plugins/platforms/directfb/qdirectfb_egl.cpp +++ b/src/plugins/platforms/directfb/qdirectfb_egl.cpp @@ -48,6 +48,7 @@ #include <QtGui/QScreen> #include <QtPlatformSupport/private/qeglplatformcontext_p.h> +#include <QtPlatformSupport/private/qeglconvenience_p.h> #include <EGL/egl.h> @@ -158,6 +159,20 @@ QDirectFbWindowEGL::~QDirectFbWindowEGL() } } +EGLSurface QDirectFbWindowEGL::eglSurface() +{ + if (m_eglSurface == EGL_NO_SURFACE) { + QDirectFbScreenEGL *dfbScreen = static_cast<QDirectFbScreenEGL *>(screen()); + EGLConfig config = q_configFromGLFormat(dfbScreen->eglDisplay(), format(), true); + m_eglSurface = eglCreateWindowSurface(dfbScreen->eglDisplay(), config, dfbSurface(), NULL); + + if (m_eglSurface == EGL_NO_SURFACE) + eglGetError(); + } + + return m_eglSurface; +} + QSurfaceFormat QDirectFbWindowEGL::format() const { return window()->requestedFormat(); diff --git a/src/plugins/platforms/directfb/qdirectfbscreen.h b/src/plugins/platforms/directfb/qdirectfbscreen.h index b719146c90..b9d53beaa5 100644 --- a/src/plugins/platforms/directfb/qdirectfbscreen.h +++ b/src/plugins/platforms/directfb/qdirectfbscreen.h @@ -43,6 +43,7 @@ #define QDIRECTFBSCREEN_H #include "qdirectfbconvenience.h" +#include "qdirectfbcursor.h" #include <QtGui/QPlatformIntegration> @@ -50,7 +51,6 @@ QT_BEGIN_NAMESPACE -class QDirectFBCursor; class QDirectFbScreen : public QPlatformScreen { |