Make sure to markDirty the node from UniformAnimator.
authorGunnar Sletta <gunnar.sletta@digia.com>
Thu, 3 Oct 2013 07:01:51 +0000 (09:01 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 3 Oct 2013 15:48:34 +0000 (17:48 +0200)
Failure to do so will not repaint scene graphs which only
has changes from the animator.

Change-Id: Id420775d704df17379ca9b0eecd543fd3829fd00
Reviewed-by: Michael Brasser <michael.brasser@live.com>
src/quick/util/qquickanimatorjob.cpp

index 980bbf3..389ef23 100644 (file)
@@ -563,6 +563,10 @@ void QQuickUniformAnimatorJob::updateCurrentTime(int time)
     QQuickShaderEffectMaterial *material =
             static_cast<QQuickShaderEffectMaterial *>(m_node->material());
     material->uniforms[m_uniformType][m_uniformIndex].value = m_value;
+    // As we're not touching the nodes, we need to explicitly mark it dirty.
+    // Otherwise, the renderer will abort repainting if this was the only
+    // change in the graph currently rendering.
+    m_node->markDirty(QSGNode::DirtyMaterial);
 }
 
 void QQuickUniformAnimatorJob::writeBack()