summaryrefslogtreecommitdiff
path: root/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2021-04-22 08:42:33 +0200
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2021-05-27 11:49:03 +0200
commitb19b0fbaf775e8b8eda1e03c265a5393d618c6c0 (patch)
treeeff0de6468787a61ec2f4b1500e54c6df77296da /src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
parenta1d734e0bec69e17d5a13a37f0aefbe57ff76979 (diff)
downloadqtwayland-b19b0fbaf775e8b8eda1e03c265a5393d618c6c0.tar.gz
client: Gracefully handle shutdown and window hiding
When a window is hidden or destroyed, the render thread may already be rendering. We need to properly read-lock the surface pointer when it is in use and exit when it becomes null. Note that there is also a potential crash in the Mesa GL driver where it keeps a proxy to the wl_surface, so if we delete this while we are still rendering, it can crash inside the driver. This is not addressed by this patch, and has not been reproduced on any other drivers so far. [ChangeLog][Client] Fixed a crash that could happen when hiding or closing windows while Qt Quick was actively rendering on a different thread. Pick-to: 6.0 6.1 5.15 Fixes: QTBUG-91264 Fixes: QTBUG-90037 Task-number: QTBUG-92249 Change-Id: I029b123b83c58740321e8b90a463ced748d8bcf4 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: David Edmundson <davidedmundson@kde.org>
Diffstat (limited to 'src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp')
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
index b6106e93..65ec22f1 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
@@ -192,7 +192,6 @@ public:
}
void blit(QWaylandEglWindow *window)
{
- Q_ASSERT(window->wlSurface());
QOpenGLTextureCache *cache = QOpenGLTextureCache::cacheForContext(m_context->context());
QSize surfaceSize = window->surfaceSize();