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_PICTURE_LAYER_IMPL_H_ | 5 #ifndef CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
6 #define CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 6 #define CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
70 LayerEvictionTileIterator(PictureLayerImpl* layer, | 70 LayerEvictionTileIterator(PictureLayerImpl* layer, |
71 TreePriority tree_priority); | 71 TreePriority tree_priority); |
72 ~LayerEvictionTileIterator(); | 72 ~LayerEvictionTileIterator(); |
73 | 73 |
74 Tile* operator*(); | 74 Tile* operator*(); |
75 const Tile* operator*() const; | 75 const Tile* operator*() const; |
76 LayerEvictionTileIterator& operator++(); | 76 LayerEvictionTileIterator& operator++(); |
77 operator bool() const; | 77 operator bool() const; |
78 | 78 |
79 private: | 79 private: |
80 // The order of this enum determines the order of tiling iteration. | |
81 enum TilingIterationDirection { | |
82 HIGHER_THAN_HIGH_RES, | |
83 LOWER_THAN_HIGH_RES, | |
84 LOW_RES, | |
85 HIGH_RES, | |
86 NUM_ITERATION_DIRECTIONS | |
87 }; | |
reveman
2014/07/29 01:24:25
Can you describe all the phases that this iterator
| |
88 | |
80 void AdvanceToNextIterator(); | 89 void AdvanceToNextIterator(); |
81 bool IsCorrectType( | 90 bool AdvanceNextTilingIndex(); |
82 PictureLayerTiling::TilingEvictionTileIterator* it) const; | |
83 | 91 |
84 std::vector<PictureLayerTiling::TilingEvictionTileIterator> iterators_; | 92 PictureLayerTiling::TilingEvictionTileIterator iterator_; |
85 size_t iterator_index_; | 93 size_t tiling_index_; |
94 TilingIterationDirection tiling_direction_; | |
86 TilePriority::PriorityBin iteration_stage_; | 95 TilePriority::PriorityBin iteration_stage_; |
87 bool required_for_activation_; | 96 bool required_for_activation_; |
97 size_t high_res_tiling_index_; | |
98 size_t low_res_tiling_index_; | |
99 TreePriority tree_priority_; | |
88 | 100 |
89 PictureLayerImpl* layer_; | 101 PictureLayerImpl* layer_; |
90 }; | 102 }; |
91 | 103 |
92 static scoped_ptr<PictureLayerImpl> Create(LayerTreeImpl* tree_impl, int id) { | 104 static scoped_ptr<PictureLayerImpl> Create(LayerTreeImpl* tree_impl, int id) { |
93 return make_scoped_ptr(new PictureLayerImpl(tree_impl, id)); | 105 return make_scoped_ptr(new PictureLayerImpl(tree_impl, id)); |
94 } | 106 } |
95 virtual ~PictureLayerImpl(); | 107 virtual ~PictureLayerImpl(); |
96 | 108 |
97 // LayerImpl overrides. | 109 // LayerImpl overrides. |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
217 gfx::Size viewport_size_for_tile_priority_; | 229 gfx::Size viewport_size_for_tile_priority_; |
218 gfx::Transform screen_space_transform_for_tile_priority_; | 230 gfx::Transform screen_space_transform_for_tile_priority_; |
219 | 231 |
220 friend class PictureLayer; | 232 friend class PictureLayer; |
221 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); | 233 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); |
222 }; | 234 }; |
223 | 235 |
224 } // namespace cc | 236 } // namespace cc |
225 | 237 |
226 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 238 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
OLD | NEW |