+472
−0
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
LayerHierarchy allows us to navigate the layer tree in z-order, or depth first traversal. The hierarchy is created from a set of requested layer states and the structure itself does not contain additional layer states. This is in contrast to the existing model where the Layer class contained information about the hierarchy it belonged to. By breaking out of this model, we can make the layer class (now called RequestedLayerState) simpler and separate client states from the hierarchy. This also allows us to construct more flexible hierarchies that handles mirroring and relative parents more efficiently. When traversing the hierarchy, each node can be visited multiple times. For example, it could be visited as a child, a relative child, or a mirrored child. The class introduces the concept of variants to distinguish the traversal path. In the upcoming cl, this traversal will be used to compute the final composition state in z-order. Bug: 238781169 Test: presubmit Change-Id: I9902e521df2d47556e3a671e2134d5be8cd2a73f