diff options
author | VaL Doroshchuk <valentyn.doroshchuk@qt.io> | 2018-02-01 09:06:23 +0100 |
---|---|---|
committer | VaL Doroshchuk <valentyn.doroshchuk@qt.io> | 2018-08-27 09:48:27 +0000 |
commit | 9dee534836092787d774be7face029b5cf53e546 (patch) | |
tree | b4298536289852f360543da875bfe659c89a4c03 | |
parent | 7c4335d0307abde6dd17738481d006d70771714c (diff) |
Delete textures even if one of the windows is invisible
If there is an invisible window that will not be rendered but
is constantly requested to render, updatePending is always set.
This prevented purging of already unneeded textures, and meant
endSync() was never called and m_texturesToDelete was never cleared.
Added a fix to clear the updatePending flag regardless of visibility.
Task-number: QTBUG-66116
Change-Id: Ib8bf453a3dee18d3d43342580c619664b701acae
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
-rw-r--r-- | src/quick/scenegraph/qsgrenderloop.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/quick/scenegraph/qsgrenderloop.cpp b/src/quick/scenegraph/qsgrenderloop.cpp index 2eaed497ef..05f635cf1d 100644 --- a/src/quick/scenegraph/qsgrenderloop.cpp +++ b/src/quick/scenegraph/qsgrenderloop.cpp @@ -349,11 +349,16 @@ void QSGGuiThreadRenderLoop::windowDestroyed(QQuickWindow *window) void QSGGuiThreadRenderLoop::renderWindow(QQuickWindow *window) { - QQuickWindowPrivate *cd = QQuickWindowPrivate::get(window); - if (!cd->isRenderable() || !m_windows.contains(window)) + if (!m_windows.contains(window)) return; WindowData &data = const_cast<WindowData &>(m_windows[window]); + bool alsoSwap = data.updatePending; + data.updatePending = false; + + QQuickWindowPrivate *cd = QQuickWindowPrivate::get(window); + if (!cd->isRenderable()) + return; bool current = false; @@ -380,9 +385,6 @@ void QSGGuiThreadRenderLoop::renderWindow(QQuickWindow *window) current = gl->makeCurrent(window); } - bool alsoSwap = data.updatePending; - data.updatePending = false; - bool lastDirtyWindow = true; auto i = m_windows.constBegin(); while (i != m_windows.constEnd()) { |