OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CC_LAYERS_LAYER_ITERATOR_H_ | 5 #ifndef CC_LAYERS_LAYER_ITERATOR_H_ |
6 #define CC_LAYERS_LAYER_ITERATOR_H_ | 6 #define CC_LAYERS_LAYER_ITERATOR_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "cc/base/cc_export.h" | 9 #include "cc/base/cc_export.h" |
10 #include "cc/trees/layer_tree_host_common.h" | 10 #include "cc/trees/layer_tree_host_common.h" |
11 | 11 |
12 namespace cc { | 12 namespace cc { |
13 | 13 |
14 // These classes provide means to iterate over the | 14 // These classes provide means to iterate over the |
15 // RenderSurface-Layer tree. | 15 // RenderSurface-Layer tree. |
16 | 16 |
17 // Example code follows, for a tree of Layer/RenderSurface objects. | 17 // Example code follows, for a tree of Layer/RenderSurface objects. |
18 // See below for details. | 18 // See below for details. |
19 // | 19 // |
20 // void DoStuffOnLayers( | 20 // void DoStuffOnLayers( |
21 // const std::vector<scoped_refptr<Layer> >& render_surface_layer_list) { | 21 // const LayerList& render_surface_layer_list) { |
22 // typedef LayerIterator<Layer, | 22 // typedef LayerIterator<Layer, |
| 23 // LayerList, |
23 // RenderSurface, | 24 // RenderSurface, |
24 // LayerIteratorActions::FrontToBack> | 25 // LayerIteratorActions::FrontToBack> |
25 // LayerIteratorType; | 26 // LayerIteratorType; |
26 // | 27 // |
27 // LayerIteratorType end = | 28 // LayerIteratorType end = |
28 // LayerIteratorType::End(&render_surface_layer_list); | 29 // LayerIteratorType::End(&render_surface_layer_list); |
29 // for (LayerIteratorType | 30 // for (LayerIteratorType |
30 // it = LayerIteratorType::Begin(&render_surface_layer_list); | 31 // it = LayerIteratorType::Begin(&render_surface_layer_list); |
31 // it != end; | 32 // it != end; |
32 // ++it) { | 33 // ++it) { |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 typename RenderSurfaceType, | 302 typename RenderSurfaceType, |
302 typename ActionType> | 303 typename ActionType> |
303 void GoToHighestInSubtree( | 304 void GoToHighestInSubtree( |
304 LayerIterator<LayerType, LayerList, RenderSurfaceType, ActionType>* it); | 305 LayerIterator<LayerType, LayerList, RenderSurfaceType, ActionType>* it); |
305 }; | 306 }; |
306 }; | 307 }; |
307 | 308 |
308 } // namespace cc | 309 } // namespace cc |
309 | 310 |
310 #endif // CC_LAYERS_LAYER_ITERATOR_H_ | 311 #endif // CC_LAYERS_LAYER_ITERATOR_H_ |
OLD | NEW |