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 struct TilingIterationRange { | |
81 int start_index; | |
82 int one_past_end_index; | |
83 }; | |
84 | |
85 void ConstructRanges(); | |
86 bool CurrentTilingIndexInRange(); | |
80 void AdvanceToNextIterator(); | 87 void AdvanceToNextIterator(); |
81 bool IsCorrectType( | 88 bool AdvanceTiling(); |
82 PictureLayerTiling::TilingEvictionTileIterator* it) const; | 89 bool AdvanceRange(); |
90 bool AdvanceStage(); | |
83 | 91 |
84 std::vector<PictureLayerTiling::TilingEvictionTileIterator> iterators_; | 92 PictureLayerTiling::TilingEvictionTileIterator iterator_; |
85 size_t iterator_index_; | 93 int tiling_index_; |
86 TilePriority::PriorityBin iteration_stage_; | 94 TilePriority::PriorityBin iteration_stage_; |
95 TilingIterationRange ranges_[5]; | |
reveman
2014/07/29 16:50:49
Some enums representing each stage and each range
vmpstr
2014/07/29 17:08:49
Ok, I will do this.
| |
96 int range_index_; | |
87 bool required_for_activation_; | 97 bool required_for_activation_; |
98 TreePriority tree_priority_; | |
88 | 99 |
89 PictureLayerImpl* layer_; | 100 PictureLayerImpl* layer_; |
90 }; | 101 }; |
reveman
2014/07/29 16:50:49
If I understand this iterator correctly. This is w
vmpstr
2014/07/29 17:08:49
That's kind of what we have with AdvanceTiling/Adv
reveman
2014/07/29 18:04:32
Yea, that's what I was thinking. Maybe the RangeIt
| |
91 | 102 |
92 static scoped_ptr<PictureLayerImpl> Create(LayerTreeImpl* tree_impl, int id) { | 103 static scoped_ptr<PictureLayerImpl> Create(LayerTreeImpl* tree_impl, int id) { |
93 return make_scoped_ptr(new PictureLayerImpl(tree_impl, id)); | 104 return make_scoped_ptr(new PictureLayerImpl(tree_impl, id)); |
94 } | 105 } |
95 virtual ~PictureLayerImpl(); | 106 virtual ~PictureLayerImpl(); |
96 | 107 |
97 // LayerImpl overrides. | 108 // LayerImpl overrides. |
98 virtual const char* LayerTypeAsString() const OVERRIDE; | 109 virtual const char* LayerTypeAsString() const OVERRIDE; |
99 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) | 110 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) |
100 OVERRIDE; | 111 OVERRIDE; |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
217 gfx::Size viewport_size_for_tile_priority_; | 228 gfx::Size viewport_size_for_tile_priority_; |
218 gfx::Transform screen_space_transform_for_tile_priority_; | 229 gfx::Transform screen_space_transform_for_tile_priority_; |
219 | 230 |
220 friend class PictureLayer; | 231 friend class PictureLayer; |
221 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); | 232 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); |
222 }; | 233 }; |
223 | 234 |
224 } // namespace cc | 235 } // namespace cc |
225 | 236 |
226 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 237 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
OLD | NEW |