diff options
Diffstat (limited to 'src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp')
-rw-r--r-- | src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp index 38419a55c8..16767114ab 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp @@ -63,8 +63,9 @@ QT_BEGIN_NAMESPACE QMutex QEglFSKmsGbmScreen::m_waitForFlipMutex; QEglFSKmsGbmIntegration::QEglFSKmsGbmIntegration() - : QEglFSKmsIntegration() -{} +{ + qCDebug(qLcEglfsKmsDebug, "New DRM/KMS via GBM integration created"); +} EGLNativeWindowType QEglFSKmsGbmIntegration::createNativeWindow(QPlatformWindow *platformWindow, const QSize &size, @@ -104,10 +105,12 @@ void QEglFSKmsGbmIntegration::destroyNativeWindow(EGLNativeWindowType window) QPlatformCursor *QEglFSKmsGbmIntegration::createCursor(QPlatformScreen *screen) const { - if (hwCursor()) - return Q_NULLPTR; - else + if (screenConfig()->hwCursor()) { + return nullptr; + } else { + qCDebug(qLcEglfsKmsDebug, "Using plain OpenGL mouse cursor"); return new QEglFSCursor(screen); + } } void QEglFSKmsGbmIntegration::presentBuffer(QPlatformSurface *surface) @@ -118,13 +121,12 @@ void QEglFSKmsGbmIntegration::presentBuffer(QPlatformSurface *surface) screen->flip(); } -QEglFSKmsDevice *QEglFSKmsGbmIntegration::createDevice(const QString &devicePath) +QKmsDevice *QEglFSKmsGbmIntegration::createDevice() { - QString path = devicePath; - if (!devicePath.isEmpty()) { - qCDebug(qLcEglfsKmsDebug) << "Using DRM device" << path << "specified in config file"; + QString path = screenConfig()->devicePath(); + if (!path.isEmpty()) { + qCDebug(qLcEglfsKmsDebug) << "GBM: Using DRM device" << path << "specified in config file"; } else { - QDeviceDiscovery *d = QDeviceDiscovery::create(QDeviceDiscovery::Device_VideoMask); const QStringList devices = d->scanConnectedDevices(); qCDebug(qLcEglfsKmsDebug) << "Found the following video devices:" << devices; @@ -137,7 +139,7 @@ QEglFSKmsDevice *QEglFSKmsGbmIntegration::createDevice(const QString &devicePath qCDebug(qLcEglfsKmsDebug) << "Using" << path; } - return new QEglFSKmsGbmDevice(this, path); + return new QEglFSKmsGbmDevice(screenConfig(), path); } QT_END_NAMESPACE |