diff options
author | Robin Burchell <robin.burchell@viroteck.net> | 2014-10-14 12:17:28 +0200 |
---|---|---|
committer | Gunnar Sletta <gunnar@sletta.org> | 2014-10-16 08:38:22 +0200 |
commit | 4a83ef27d54d40d4224d8cee063447c9b1f7488a (patch) | |
tree | 6ee8080e119b7ea78e83325d2a45dc6b9de14fb5 | |
parent | df663042ca8776d409e5474933b7d5663eb5a3cc (diff) |
Only delete all child nodes twice if effectRefEffectivelyChanged is set.
We already handle ChildrenUpdateMask again in the general case below, so this
second clear doesn't make sense, *but* for the fact that we are modifying
groupNode here when effectRefEffectivelyChanged is set. So keep doing it for
that case.
As a nice side-effect, this means that groupNode is not always allocated.
Also, don't fetch groupNode redundantly if we are clearing nodes.
Task-number: QTBUG-34255
Change-Id: Icc01b942d3c09c17300e19d61e9a65f220004796
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
-rw-r--r-- | src/quick/items/qquickwindow.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp index 990c339630..bf79158442 100644 --- a/src/quick/items/qquickwindow.cpp +++ b/src/quick/items/qquickwindow.cpp @@ -2720,16 +2720,21 @@ void QQuickWindowPrivate::updateDirtyNode(QQuickItem *item) } } - if (dirty & QQuickItemPrivate::ChildrenUpdateMask) - itemPriv->childContainerNode()->removeAllChildNodes(); - if (effectRefEffectivelyChanged) { + QSGNode *child = 0; + + if (dirty & QQuickItemPrivate::ChildrenUpdateMask) { + child = itemPriv->childContainerNode(); + child->removeAllChildNodes(); + } else { + child = itemPriv->groupNode; + } + QSGNode *parent = itemPriv->clipNode(); if (!parent) parent = itemPriv->opacityNode(); if (!parent) parent = itemPriv->itemNode(); - QSGNode *child = itemPriv->groupNode; if (itemPriv->extra.isAllocated() && itemPriv->extra->effectRefCount) { Q_ASSERT(itemPriv->rootNode() == 0); |