summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiulio Camuffo <giulio.camuffo@jollamobile.com>2015-09-03 11:14:18 +0200
committerGiulio Camuffo <giulio.camuffo@jollamobile.com>2015-09-09 10:20:11 +0000
commit10fd51a3e69a0a2ee6b8cd151fa6c847f684253c (patch)
treecfebb243ac1310f4dd1aef54f30b8c108d725f02
parent3dc9cfdbd2771c28c770d432b99e571db43fe599 (diff)
Fix deadlock when hiding and showing EGL windowsv5.5.1
When hiding a window we attach a NULL buffer, which means that any frame callback that is still waiting will not be sent. In the SHM case we just destroy it, but we cannot do that in the EGL case, since we don't have a hold of it. So destroy the EGLSurface, which will in turn destroy the callback. Task-number: QTBUG-46921 Change-Id: I20e0d1ca7b53fb88096101d46979996dd944d429 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp7
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
index 2c3697bd..efed808f 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
@@ -149,6 +149,13 @@ QSurfaceFormat QWaylandEglWindow::format() const
return m_format;
}
+void QWaylandEglWindow::setVisible(bool visible)
+{
+ QWaylandWindow::setVisible(visible);
+ if (!visible)
+ invalidateSurface();
+}
+
void QWaylandEglWindow::invalidateSurface()
{
if (m_eglSurface) {
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.h b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.h
index 60722d16..c6bb4344 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.h
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.h
@@ -66,6 +66,7 @@ public:
void bindContentFBO();
void invalidateSurface() Q_DECL_OVERRIDE;
+ void setVisible(bool visible) Q_DECL_OVERRIDE;
private:
QWaylandEglClientBufferIntegration *m_clientBufferIntegration;