summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/directfb/qdirectfb_egl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/directfb/qdirectfb_egl.cpp')
-rw-r--r--src/plugins/platforms/directfb/qdirectfb_egl.cpp22
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