Skip to content

Commit

Permalink
Merge branch 'jb35332' into 'mer-stable'
Browse files Browse the repository at this point in the history
[qtdeclarative] Fix race condition in threaded renderloop. Contributes to JB#35332.



See merge request !6
  • Loading branch information
sletta committed May 24, 2016
2 parents 97c20cd + d47a01a commit f55b53f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/quick/scenegraph/qsgthreadedrenderloop.cpp
Expand Up @@ -154,7 +154,7 @@ const QEvent::Type WM_TryRelease = QEvent::Type(QEvent::User + 4);
// called.
const QEvent::Type WM_Grab = QEvent::Type(QEvent::User + 5);

template <typename T> T *windowFor(const QList<T> list, QQuickWindow *window)
template <typename T> T *windowFor(const QList<T> &list, QQuickWindow *window)
{
for (int i=0; i<list.size(); ++i) {
const T &t = list.at(i);
Expand Down Expand Up @@ -953,9 +953,9 @@ void QSGThreadedRenderLoop::handleObscurity(Window *w)
void QSGThreadedRenderLoop::handleUpdateRequest(QQuickWindow *window)
{
qCDebug(QSG_LOG_RENDERLOOP) << "- polish and sync update request";
foreach (const Window &w, m_windows)
if (w.window == window)
polishAndSync(const_cast<Window *>(&w));
Window *w = windowFor(m_windows, window);
if (w)
polishAndSync(w);
}

void QSGThreadedRenderLoop::maybeUpdate(QQuickWindow *window)
Expand Down

0 comments on commit f55b53f

Please sign in to comment.