updateSubtreeNeedsAddToScene method

  1. @protected
  2. @visibleForTesting
void updateSubtreeNeedsAddToScene()

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:

ContainerLayer overrides this method to recursively call it on its children.

Implementation

@protected
@visibleForTesting
void updateSubtreeNeedsAddToScene() {
  assert(!_debugMutationsLocked);
  _needsAddToScene = _needsAddToScene || alwaysNeedsAddToScene;
}