diff options
Diffstat (limited to 'src/plugins/platforms/directfb/qdirectfb_egl.cpp')
-rw-r--r-- | src/plugins/platforms/directfb/qdirectfb_egl.cpp | 15 |
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(); |