Extend eglhooks to include hasCapability
Add BufferQueueingOpenGL to Raspberry PI's numerous capabilities Change-Id: I1197c28a0c82df3ae2f6d5360791010e17373555 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com> Reviewed-by: Donald Carr <donald.carr@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>bb10
parent
127c431e25
commit
42f3bf772b
|
|
@ -92,4 +92,9 @@ void QEglFSHooks::destroyNativeWindow(EGLNativeWindowType window)
|
|||
delete window;
|
||||
}
|
||||
|
||||
bool QEglFSHooks::hasCapability(QPlatformIntegration::Capability cap) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
QEglFSHooks platform_hooks;
|
||||
|
|
|
|||
|
|
@ -140,4 +140,17 @@ void QEglFSHooks::destroyNativeWindow(EGLNativeWindowType window)
|
|||
delete eglWindow;
|
||||
}
|
||||
|
||||
bool QEglFSHooks::hasCapability(QPlatformIntegration::Capability cap) const
|
||||
{
|
||||
switch (cap) {
|
||||
case QPlatformIntegration::ThreadedPixmaps:
|
||||
case QPlatformIntegration::OpenGL:
|
||||
case QPlatformIntegration::ThreadedOpenGL:
|
||||
case QPlatformIntegration::BufferQueueingOpenGL:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
QEglFSHooks platform_hooks;
|
||||
|
|
|
|||
|
|
@ -54,8 +54,16 @@ struct QEglFSHooks {
|
|||
QSize screenSize() const;
|
||||
EGLNativeWindowType createNativeWindow(const QSize &size);
|
||||
void destroyNativeWindow(EGLNativeWindowType window);
|
||||
bool hasCapability(QPlatformIntegration::Capability cap) const;
|
||||
};
|
||||
|
||||
#ifdef EGLFS_PLATFORM_HOOKS
|
||||
extern QEglFSHooks platform_hooks;
|
||||
static QEglFSHooks *hooks = &platform_hooks;
|
||||
#else
|
||||
static QEglFSHooks *hooks = 0;
|
||||
#endif
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -88,3 +88,8 @@ void QEglFSHooks::destroyNativeWindow(EGLNativeWindowType window)
|
|||
XDestroyWindow(display, window);
|
||||
}
|
||||
|
||||
bool QEglFSHooks::hasCapability(QPlatformIntegration::Capability cap) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -74,6 +74,10 @@ QEglFSIntegration::~QEglFSIntegration()
|
|||
|
||||
bool QEglFSIntegration::hasCapability(QPlatformIntegration::Capability cap) const
|
||||
{
|
||||
// We assume that devices will have more and not less capabilities
|
||||
if (hooks && hooks->hasCapability(cap))
|
||||
return true;
|
||||
|
||||
switch (cap) {
|
||||
case ThreadedPixmaps: return true;
|
||||
case OpenGL: return true;
|
||||
|
|
|
|||
|
|
@ -53,13 +53,6 @@
|
|||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#ifdef EGLFS_PLATFORM_HOOKS
|
||||
extern QEglFSHooks platform_hooks;
|
||||
static QEglFSHooks *hooks = &platform_hooks;
|
||||
#else
|
||||
static QEglFSHooks *hooks = 0;
|
||||
#endif
|
||||
|
||||
// #define QEGL_EXTRA_DEBUG
|
||||
|
||||
#ifdef QEGL_EXTRA_DEBUG
|
||||
|
|
|
|||
Loading…
Reference in New Issue