From f51de354b14d5a25d7e32debe0d56b9fbed67a4f Mon Sep 17 00:00:00 2001 From: Andrew den Exter Date: Tue, 13 Oct 2015 13:11:00 +1000 Subject: Revert "Don't invalidate textures when the scene graph is stopped." This was too aggressive, if there is a queued buffer the current one needs to be invalidated or the compositor will hold references to both buffers while the scene graph is stopped which will block clients in eglSwapBuffers. This reverts commit 438063af85d0999f9dead6f04a3285edb175e24c. Change-Id: I3247cfc94e12322fcccc07b5dd64146b055ab431 Reviewed-by: Giulio Camuffo --- src/compositor/compositor_api/qwaylandquicksurface.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/compositor/compositor_api/qwaylandquicksurface.cpp b/src/compositor/compositor_api/qwaylandquicksurface.cpp index a05a5f9c2..c8edcb6bc 100644 --- a/src/compositor/compositor_api/qwaylandquicksurface.cpp +++ b/src/compositor/compositor_api/qwaylandquicksurface.cpp @@ -208,6 +208,8 @@ bool QWaylandQuickSurface::event(QEvent *e) this, &QWaylandQuickSurface::updateTexture); disconnect(oldWindow, &QQuickWindow::sceneGraphInvalidated, this, &QWaylandQuickSurface::invalidateTexture); + disconnect(oldWindow, &QQuickWindow::sceneGraphAboutToStop, + this, &QWaylandQuickSurface::invalidateTexture); } return true; @@ -224,6 +226,9 @@ bool QWaylandQuickSurface::event(QEvent *e) connect(window, &QQuickWindow::sceneGraphInvalidated, this, &QWaylandQuickSurface::invalidateTexture, Qt::DirectConnection); + connect(window, &QQuickWindow::sceneGraphAboutToStop, + this, &QWaylandQuickSurface::invalidateTexture, + Qt::DirectConnection); } return true; -- cgit v1.2.3