summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp')
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp
index 6ade8c55f8..60fe8abf52 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp
@@ -167,21 +167,18 @@ public:
, m_integration(integration)
{}
void resetSurface() override;
+ void invalidateSurface() override;
const QEglFSKmsGbmIntegration *m_integration;
};
void QEglFSKmsGbmWindow::resetSurface()
{
QEglFSKmsGbmScreen *gbmScreen = static_cast<QEglFSKmsGbmScreen *>(screen());
- if (gbmScreen->surface()) {
- qWarning("Only single window per screen supported!");
- return;
- }
-
EGLDisplay display = gbmScreen->display();
QSurfaceFormat platformFormat = m_integration->surfaceFormatFor(window()->requestedFormat());
m_config = QEglFSDeviceIntegration::chooseConfig(display, platformFormat);
m_format = q_glFormatFromConfig(display, m_config, platformFormat);
+ // One fullscreen window per screen -> the native window is simply the gbm_surface the screen created.
m_window = reinterpret_cast<EGLNativeWindowType>(gbmScreen->createSurface());
PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC createPlatformWindowSurface = nullptr;
@@ -199,6 +196,13 @@ void QEglFSKmsGbmWindow::resetSurface()
}
}
+void QEglFSKmsGbmWindow::invalidateSurface()
+{
+ QEglFSKmsGbmScreen *gbmScreen = static_cast<QEglFSKmsGbmScreen *>(screen());
+ QEglFSWindow::invalidateSurface();
+ gbmScreen->resetSurface();
+}
+
QEglFSWindow *QEglFSKmsGbmIntegration::createWindow(QWindow *window) const
{
return new QEglFSKmsGbmWindow(window, this);