// Copyright 2017 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CC_LAYERS_EFFECT_TREE_LAYER_LIST_ITERATOR_H_ #define CC_LAYERS_EFFECT_TREE_LAYER_LIST_ITERATOR_H_ #include "base/memory/raw_ptr_exclusion.h" #include "base/notreached.h" #include "cc/cc_export.h" #include "cc/trees/effect_node.h" #include "cc/trees/layer_tree_impl.h" #include "cc/trees/property_tree.h" namespace cc { class LayerImpl; class LayerTreeImpl; // This iterates over layers and render surfaces in front-to-back order (that // is, in reverse-draw-order). Only layers that draw content to some render // surface are visited. A render surface is visited immediately after all // layers and surfaces that contribute content to that surface are visited. // Surfaces are first visited in state kTargetSurface. Immediately after that, // every surface other than the root surface is visited in state // kContributingSurface, as it contributes to the next target surface. // // The iterator takes on the following states: // 1. kLayer: The iterator is visiting layer |current_layer()| that contributes // to surface |target_render_surface()|. // 2. kTargetSurface: The iterator is visiting render surface // |target_render_surface()|. // 3. kContributingSurface: The iterator is visiting render surface // |current_render_surface()| that contributes to surface // |target_render_surface()|. // 4. kEnd: All layers and render surfaces have already been visited. class CC_EXPORT EffectTreeLayerListIterator { … }; } // namespace cc #endif // CC_LAYERS_EFFECT_TREE_LAYER_LIST_ITERATOR_H_