diff options
author | Sergio Ahumada <sergio.ahumada@nokia.com> | 2012-04-17 10:38:24 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-17 10:38:24 +0200 |
commit | 16b53b2f0e3f8f64a59c465493a6209eb7f9ab47 (patch) | |
tree | bbb63401eb3c56c32ad9bd9be66bae8d3590de6b /src/plugins/platforms/directfb/qdirectfb_egl.cpp | |
parent | 2c13dc7482690756280cfefe8515eb809b069721 (diff) | |
parent | 9bd032355163d92cda5e7e59ecd21214b131f187 (diff) |
Merge "Merge remote-tracking branch 'origin/master' into api_changes" into refs/staging/api_changes
Diffstat (limited to 'src/plugins/platforms/directfb/qdirectfb_egl.cpp')
-rw-r--r-- | src/plugins/platforms/directfb/qdirectfb_egl.cpp | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/plugins/platforms/directfb/qdirectfb_egl.cpp b/src/plugins/platforms/directfb/qdirectfb_egl.cpp index ee0cbbae95..ac9142c0f4 100644 --- a/src/plugins/platforms/directfb/qdirectfb_egl.cpp +++ b/src/plugins/platforms/directfb/qdirectfb_egl.cpp @@ -42,6 +42,7 @@ #include "qdirectfb_egl.h" #include "qdirectfbwindow.h" #include "qdirectfbscreen.h" +#include "qdirectfbeglhooks.h" #include <QtGui/QOpenGLContext> #include <QtGui/QPlatformOpenGLContext> @@ -54,6 +55,13 @@ QT_BEGIN_NAMESPACE +#ifdef DIRECTFB_PLATFORM_HOOKS +extern QDirectFBEGLHooks platform_hook; +static QDirectFBEGLHooks *hooks = &platform_hook; +#else +static QDirectFBEGLHooks *hooks = 0; +#endif + /** * This provides OpenGL ES 2.0 integration with DirectFB. It assumes that * one can adapt a DirectFBSurface as a EGLSurface. It might need some vendor @@ -137,12 +145,14 @@ void QDirectFbScreenEGL::initializeEGL() void QDirectFbScreenEGL::platformInit() { - // Place vendor init code here. + if (hooks) + hooks->platformInit(); } void QDirectFbScreenEGL::platformDestroy() { - // Place vendor finalize code here. + if (hooks) + hooks->platformDestroy(); } QDirectFbWindowEGL::QDirectFbWindowEGL(QWindow *tlw, QDirectFbInput *input) @@ -209,4 +219,12 @@ void QDirectFbIntegrationEGL::initializeScreen() screenAdded(m_primaryScreen.data()); } +bool QDirectFbIntegrationEGL::hasCapability(QPlatformIntegration::Capability cap) const +{ + // We assume that devices will have more and not less capabilities + if (hooks && hooks->hasCapability(cap)) + return true; + return QDirectFbIntegration::hasCapability(cap); +} + QT_END_NAMESPACE |