Fix build with -no-opengl

Change-Id: I6fb61944ef88e328a94ea6b7ab42db271828a602
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
bb10
Paul Olav Tvete 2017-02-20 13:15:40 +01:00
parent 6cff40c195
commit 259adc5e77
5 changed files with 17 additions and 8 deletions

View File

@ -79,7 +79,10 @@ private:
QEglFSCursor *m_cursor;
};
class Q_EGLFS_EXPORT QEglFSCursor : public QPlatformCursor, protected QOpenGLFunctions
#if QT_CONFIG(opengl)
class Q_EGLFS_EXPORT QEglFSCursor : public QPlatformCursor
, protected QOpenGLFunctions
{
Q_OBJECT
public:
@ -153,6 +156,7 @@ private:
};
QHash<QOpenGLContext *, GraphicsContextData> m_gfx;
};
#endif // QT_CONFIG(opengl)
QT_END_NAMESPACE

View File

@ -9,7 +9,7 @@ qtConfig(eglfs_mali): SUBDIRS += eglfs_mali
qtConfig(eglfs_viv): SUBDIRS += eglfs_viv
qtConfig(eglfs_viv_wl): SUBDIRS += eglfs_viv_wl
SUBDIRS += eglfs_emu
qtConfig(opengl): SUBDIRS += eglfs_emu
eglfs_kms_egldevice.depends = eglfs_kms_support
eglfs_kms.depends = eglfs_kms_support

View File

@ -105,12 +105,13 @@ void QEglFSKmsGbmIntegration::destroyNativeWindow(EGLNativeWindowType window)
QPlatformCursor *QEglFSKmsGbmIntegration::createCursor(QPlatformScreen *screen) const
{
if (screenConfig()->hwCursor()) {
return nullptr;
} else {
#if QT_CONFIG(opengl)
if (!screenConfig()->hwCursor()) {
qCDebug(qLcEglfsKmsDebug, "Using plain OpenGL mouse cursor");
return new QEglFSCursor(screen);
}
#endif
return nullptr;
}
void QEglFSKmsGbmIntegration::presentBuffer(QPlatformSurface *surface)

View File

@ -85,12 +85,12 @@ EGLNativeDisplayType QEglFSKmsEglDevice::nativeDisplay() const
QPlatformScreen *QEglFSKmsEglDevice::createScreen(const QKmsOutput &output)
{
QEglFSKmsScreen *screen = new QEglFSKmsEglDeviceScreen(this, output);
#if QT_CONFIG(opengl)
if (!m_globalCursor && !screenConfig()->separateScreens()) {
qCDebug(qLcEglfsKmsDebug, "Creating new global mouse cursor");
m_globalCursor = new QEglFSCursor(screen);
}
#endif
return screen;
}

View File

@ -280,7 +280,11 @@ bool QEglFSKmsEglDeviceIntegration::query_egl_device()
QPlatformCursor *QEglFSKmsEglDeviceIntegration::createCursor(QPlatformScreen *screen) const
{
return screenConfig()->separateScreens() ? new QEglFSCursor(screen) : nullptr;
#if QT_CONFIG(opengl)
if (screenConfig()->separateScreens())
return new QEglFSCursor(screen);
#endif
return nullptr;
}
QT_END_NAMESPACE