summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew den Exter <andrew.den.exter@qinetic.com.au>2015-10-13 13:11:00 +1000
committerAndrew den Exter <andrew.den.exter@qinetic.com.au>2015-12-13 02:32:51 +0000
commitf51de354b14d5a25d7e32debe0d56b9fbed67a4f (patch)
tree68f4cdf4c11ba9eedf8b1c181347672068ea8c9c
parent4d3c3a08eba8d30805f18397c98e19ab9fd40722 (diff)
Revert "Don't invalidate textures when the scene graph is stopped."v5.6.0-beta1
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 <giuliocamuffo@gmail.com>
-rw-r--r--src/compositor/compositor_api/qwaylandquicksurface.cpp5
1 files changed, 5 insertions, 0 deletions
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;