summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@crimson.no>2017-06-16 08:03:45 +0200
committerGunnar Sletta <gunnar@crimson.no>2017-06-19 06:57:29 +0000
commit22b7ac33a10a2a9767664efece2e74a70d26c798 (patch)
tree2279db7f9436b57266537f810a0b7f38a5054f1d
parent1e0685136d0debb2a3b62d9f4650c95afe41913b (diff)
Fix excessive recursion in renderer
Change-Id: Iffee781932773fe22c7d946b532ba74492e1e2df Task-number: QTBUG-59789 Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
-rw-r--r--src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
index 78f2c86f6c..edee29584c 100644
--- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
+++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
@@ -969,9 +969,10 @@ bool Renderer::changeBatchRoot(Node *node, Node *root)
void Renderer::nodeChangedBatchRoot(Node *node, Node *root)
{
if (node->type() == QSGNode::ClipNodeType || node->isBatchRoot) {
- if (!changeBatchRoot(node, root))
- return;
- node = root;
+ // When we reach a batchroot, we only need to update it. Its subtree
+ // is relative to that root, so no need to recurse further.
+ changeBatchRoot(node, root);
+ return;
} else if (node->type() == QSGNode::GeometryNodeType) {
// Only need to change the root as nodeChanged anyway flags a full update.
Element *e = node->element();