Fix device-specific eglfs hooks to provide createNativeWindow correctly
Change-Id: I21aa17de7a79278d41b30a7590603c3382607673 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
This commit is contained in:
parent
091ca0ede2
commit
9bf820ce47
@ -54,7 +54,7 @@ class QEglFS8726MHooks : public QEglFSHooks
|
||||
{
|
||||
public:
|
||||
virtual QSize screenSize() const;
|
||||
virtual EGLNativeWindowType createNativeWindow(const QSize &size, const QSurfaceFormat &format);
|
||||
virtual EGLNativeWindowType createNativeWindow(QPlatformWindow *window, const QSize &size, const QSurfaceFormat &format);
|
||||
virtual void destroyNativeWindow(EGLNativeWindowType window);
|
||||
};
|
||||
|
||||
@ -75,9 +75,10 @@ QSize QEglFS8726MHooks::screenSize() const
|
||||
return QSize(vinfo.xres, vinfo.yres);
|
||||
}
|
||||
|
||||
EGLNativeWindowType QEglFS8726MHooks::createNativeWindow(const QSize &size, const QSurfaceFormat &format)
|
||||
EGLNativeWindowType QEglFS8726MHooks::createNativeWindow(QPlatformWindow *window, const QSize &size, const QSurfaceFormat &format)
|
||||
{
|
||||
Q_UNUSED(format);
|
||||
Q_UNUSED(window)
|
||||
Q_UNUSED(format)
|
||||
|
||||
fbdev_window *window = new fbdev_window;
|
||||
window->width = size.width();
|
||||
|
@ -49,7 +49,7 @@ class QEglFSImx6Hooks : public QEglFSHooks
|
||||
public:
|
||||
QEglFSImx6Hooks();
|
||||
virtual QSize screenSize() const;
|
||||
virtual EGLNativeWindowType createNativeWindow(const QSize &size, const QSurfaceFormat &format);
|
||||
virtual EGLNativeWindowType createNativeWindow(QPlatformWindow *window, const QSize &size, const QSurfaceFormat &format);
|
||||
virtual void destroyNativeWindow(EGLNativeWindowType window);
|
||||
virtual EGLNativeDisplayType platformDisplay() const;
|
||||
|
||||
@ -78,9 +78,10 @@ EGLNativeDisplayType QEglFSImx6Hooks::platformDisplay() const
|
||||
return mNativeDisplay;
|
||||
}
|
||||
|
||||
EGLNativeWindowType QEglFSImx6Hooks::createNativeWindow(const QSize &size, const QSurfaceFormat &format)
|
||||
EGLNativeWindowType QEglFSImx6Hooks::createNativeWindow(QPlatformWindow *window, const QSize &size, const QSurfaceFormat &format)
|
||||
{
|
||||
Q_UNUSED(format);
|
||||
Q_UNUSED(window)
|
||||
Q_UNUSED(format)
|
||||
|
||||
EGLNativeWindowType eglWindow = fbCreateWindow(mNativeDisplay, 0, 0, size.width(), size.height());
|
||||
return eglWindow;
|
||||
|
@ -226,7 +226,7 @@ public:
|
||||
virtual void platformDestroy();
|
||||
virtual EGLNativeDisplayType platformDisplay() const;
|
||||
virtual QSize screenSize() const;
|
||||
virtual EGLNativeWindowType createNativeWindow(const QSize &size, const QSurfaceFormat &format);
|
||||
virtual EGLNativeWindowType createNativeWindow(QPlatformWindow *window, const QSize &size, const QSurfaceFormat &format);
|
||||
virtual void destroyNativeWindow(EGLNativeWindowType window);
|
||||
virtual bool hasCapability(QPlatformIntegration::Capability cap) const;
|
||||
|
||||
@ -258,8 +258,9 @@ QSize QEglFSPiHooks::screenSize() const
|
||||
return QSize(width, height);
|
||||
}
|
||||
|
||||
EGLNativeWindowType QEglFSPiHooks::createNativeWindow(const QSize &size, const QSurfaceFormat &format)
|
||||
EGLNativeWindowType QEglFSPiHooks::createNativeWindow(QPlatformWindow *window, const QSize &size, const QSurfaceFormat &format)
|
||||
{
|
||||
Q_UNUSED(window)
|
||||
return createDispmanxLayer(QPoint(0, 0), size, 1, format.hasAlpha() ? DISPMANX_FLAGS_ALPHA_FROM_SOURCE : DISPMANX_FLAGS_ALPHA_FIXED_ALL_PIXELS);
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@ class QEglFSPandaHooks : public QEglFSHooks
|
||||
{
|
||||
public:
|
||||
QEglFSPandaHooks();
|
||||
virtual EGLNativeWindowType createNativeWindow(const QSize &size, const QSurfaceFormat &format);
|
||||
virtual EGLNativeWindowType createNativeWindow(QPlatformWindow *window, const QSize &size, const QSurfaceFormat &format);
|
||||
virtual bool filterConfig(EGLDisplay display, EGLConfig config) const;
|
||||
virtual const char *fbDeviceName() const { return "/dev/graphics/fb0"; }
|
||||
|
||||
@ -103,8 +103,9 @@ void QEglFSPandaHooks::ensureFramebufferNativeWindowCreated()
|
||||
window->query(window, NATIVE_WINDOW_FORMAT, &mFramebufferVisualId);
|
||||
}
|
||||
|
||||
EGLNativeWindowType QEglFSPandaHooks::createNativeWindow(const QSize &size, const QSurfaceFormat &format)
|
||||
EGLNativeWindowType QEglFSPandaHooks::createNativeWindow(QPlatformWindow *window, const QSize &size, const QSurfaceFormat &format)
|
||||
{
|
||||
Q_UNUSED(window)
|
||||
return mUseFramebuffer ? createNativeWindowFramebuffer(size, format) : createNativeWindowSurfaceFlinger(size, format);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user