summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPär-Olof Håkansson <poe.hakansson@gmail.com>2015-12-11 10:47:00 +0100
committerRobin Burchell <robin.burchell@viroteck.net>2016-01-19 00:31:23 +0000
commit9000c0465020c698e7ecebbe2f326c689f3ec112 (patch)
tree8d5574d3ac57cc0a16768a585ada2cb6f7fe9f62
parentc1bdf815494caafd618e52f3b9ef7558d61b5ec5 (diff)
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>
-rw-r--r--src/quick/scenegraph/qsgdefaultimagenode.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/quick/scenegraph/qsgdefaultimagenode.cpp b/src/quick/scenegraph/qsgdefaultimagenode.cpp
index 0591d0fe2f..1f0b0fa9da 100644
--- a/src/quick/scenegraph/qsgdefaultimagenode.cpp
+++ b/src/quick/scenegraph/qsgdefaultimagenode.cpp
@@ -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()) {