aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@digia.com>2013-10-04 10:39:20 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-04 15:28:20 +0200
commit9b82136534bfb6877dae6318ab9c7f4259131b0f (patch)
tree0527ba7899579e4e12a0e22aa29f364a0468f065 /src/quick
parent772c03def11e3e60a53f272746277b70c53635c0 (diff)
Respect DirtyForceUpdate in QSGBatchRenderer.
There is a way this could have been done slightly more efficitently. If we moved all "combined" logic out of the scene graph and into the Node shadow tree, we could ignore the forceupdate all together. However, this is a quite large change for what is currently a non-common case. It would also increase overall memory consumption a bit as we would have superfluous combined matrix and opacity in the QSGNodes. Task-number: QTBUG-33838 Change-Id: I06c486ace2be15bef1f1dc72a8b41cb649d7c813 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src/quick')
-rw-r--r--src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
index d52f9db089..ab67dc5ba9 100644
--- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
+++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
@@ -303,6 +303,8 @@ void Updater::updateStates(QSGNode *n)
qDebug() << " - transforms have changed";
if (sn->dirtyState & (QSGNode::DirtyOpacity << 16))
qDebug() << " - opacity has changed";
+ if (sn->dirtyState & (QSGNode::DirtyForceUpdate << 16))
+ qDebug() << " - forceupdate";
}
visitNode(sn);
@@ -317,6 +319,10 @@ void Updater::visitNode(Node *n)
if (n->dirtyState & QSGNode::DirtyNodeAdded)
++m_added;
+ int force = m_force_update;
+ if (n->dirtyState & QSGNode::DirtyForceUpdate)
+ ++m_force_update;
+
switch (n->type()) {
case QSGNode::OpacityNodeType:
visitOpacityNode(n);
@@ -340,6 +346,7 @@ void Updater::visitNode(Node *n)
}
m_added = count;
+ m_force_update = force;
n->dirtyState = 0;
}
@@ -1103,7 +1110,8 @@ void Renderer::nodeChanged(QSGNode *node, QSGNode::DirtyState state)
QSGNode::DirtyState dirtyChain = state & (QSGNode::DirtyNodeAdded
| QSGNode::DirtyOpacity
| QSGNode::DirtyMatrix
- | QSGNode::DirtySubtreeBlocked);
+ | QSGNode::DirtySubtreeBlocked
+ | QSGNode::DirtyForceUpdate);
if (dirtyChain != 0) {
dirtyChain = QSGNode::DirtyState(dirtyChain << 16);
Node *sn = shadowNode->parent;