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>
bb10
Holger Hans Peter Freyther 2011-12-05 22:30:32 +08:00 committed by Qt by Nokia
parent e68642fe10
commit f091eccf91
2 changed files with 16 additions and 1 deletions

View File

@ -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();

View File

@ -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
{