summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/directfb/qdirectfb_egl.cpp
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2011-12-05 22:30:32 +0800
committerQt by Nokia <qt-info@nokia.com>2011-12-06 20:14:10 +0100
commitf091eccf9124f951fc41cfaa6b4be68e7379a5d6 (patch)
tree39543dc0c7e68a9887affa1cb79553d0aea62929 /src/plugins/platforms/directfb/qdirectfb_egl.cpp
parente68642fe1003467f1483dd8ddb2528cd3136042e (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/platforms/directfb/qdirectfb_egl.cpp')
-rw-r--r--src/plugins/platforms/directfb/qdirectfb_egl.cpp15
1 files changed, 15 insertions, 0 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();