diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2017-08-02 13:10:59 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2017-09-05 06:32:57 +0000 |
commit | 95d73132c7c64f8ac2e17e2c4a7622cb17881558 (patch) | |
tree | ce975aa7213dcdb0b2763f6155d5153dd01ce1ed /src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp | |
parent | 18af5433045107c1a06cc7f52662ed94b493b49a (diff) |
eglfs_kms: Lift the one window per screen ever limitation
There is still one fullscreen window per screen at a time, but
there is no reason we should fail in the backend when the screen
already has the gbm_surface created. If there is really another
active GL window for this screen, then the base eglfs window
implementation will panic anyway.
This should help certain cases, where windows belonging to screen B get
created for screen A and then moved (recreated) for screen B.
Task-number: QTBUG-62262
Change-Id: Ia029f028d32a35e8e023f3132097ba9a919b8fe8
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp')
-rw-r--r-- | src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp index 03301d2768..a9fd0adf17 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp @@ -132,14 +132,19 @@ QPlatformCursor *QEglFSKmsGbmScreen::cursor() const gbm_surface *QEglFSKmsGbmScreen::createSurface() { if (!m_gbm_surface) { - qCDebug(qLcEglfsKmsDebug) << "Creating window for screen" << name(); + qCDebug(qLcEglfsKmsDebug) << "Creating gbm_surface for screen" << name(); m_gbm_surface = gbm_surface_create(static_cast<QEglFSKmsGbmDevice *>(device())->gbmDevice(), rawGeometry().width(), rawGeometry().height(), GBM_FORMAT_XRGB8888, GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING); } - return m_gbm_surface; // not owned, gets destroyed in QEglFSKmsGbmIntegration::destroyNativeWindow() + return m_gbm_surface; // not owned, gets destroyed in QEglFSKmsGbmIntegration::destroyNativeWindow() via QEglFSKmsGbmWindow::invalidateSurface() +} + +void QEglFSKmsGbmScreen::resetSurface() +{ + m_gbm_surface = nullptr; } void QEglFSKmsGbmScreen::waitForFlip() |