updateSubtreeNeedsAddToScene method
Traverses the layer subtree starting from this layer and determines whether it needs addToScene.
A layer needs addToScene if any of the following is true:
- alwaysNeedsAddToScene is true.
- markNeedsAddToScene has been called.
- Any of its descendants need addToScene.
ContainerLayer overrides this method to recursively call it on its children.
Implementation
@protected
@visibleForTesting
void updateSubtreeNeedsAddToScene() {
assert(!_debugMutationsLocked);
_needsAddToScene = _needsAddToScene || alwaysNeedsAddToScene;
}