From: Gunnar Sletta Date: Fri, 4 Oct 2013 08:39:20 +0000 (+0200) Subject: Respect DirtyForceUpdate in QSGBatchRenderer. X-Git-Tag: upstream/5.2.1~278 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9b82136534bfb6877dae6318ab9c7f4259131b0f;p=platform%2Fupstream%2Fqtdeclarative.git 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 --- diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp index d52f9db..ab67dc5 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;