QSGDefaultImageNode: Only set DirtyGeometry if new texture

QSGDefaultImageNode::preprocess() always sets the
geometry to dirty even if no new texture was grabbed.

Change-Id: Ifb6ce160854aa0a5b9e0f87fbf517b21e86e0ade
Task-number: QTBUG-49904
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
This commit is contained in:
Pär-Olof Håkansson 2015-12-11 10:47:00 +01:00 committed by Robin Burchell
parent c1bdf81549
commit 9000c04650
1 changed files with 2 additions and 1 deletions

View File

@ -287,7 +287,8 @@ void QSGDefaultImageNode::preprocess()
QSGDynamicTexture *t = qobject_cast<QSGDynamicTexture *>(m_material.texture());
if (t) {
doDirty = t->updateTexture();
updateGeometry();
if (doDirty)
updateGeometry();
}
bool alpha = m_material.flags() & QSGMaterial::Blending;
if (m_material.texture() && alpha != m_material.texture()->hasAlphaChannel()) {