Chromium Code Reviews| 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 enum RangeType { | |
| 81 HIGHER_THAN_HIGH_RES, | |
| 82 LOWER_THAN_LOW_RES, | |
| 83 BETWEEN_HIGH_AND_LOW_RES, | |
| 84 LOW_RES, | |
| 85 HIGH_RES, | |
| 86 NUM_RANGE_TYPES | |
| 87 }; | |
| 88 struct TilingIterationRange { | |
| 89 int start_index; | |
| 90 int one_past_end_index; | |
| 91 }; | |
| 92 | |
| 93 void ConstructRanges(); | |
| 94 bool CurrentTilingIndexInRange(); | |
| 80 void AdvanceToNextIterator(); | 95 void AdvanceToNextIterator(); |
| 81 bool IsCorrectType( | 96 bool AdvanceTiling(); |
| 82 PictureLayerTiling::TilingEvictionTileIterator* it) const; | 97 bool AdvanceRange(); |
| 98 bool AdvanceStage(); | |
| 83 | 99 |
| 84 std::vector<PictureLayerTiling::TilingEvictionTileIterator> iterators_; | 100 PictureLayerTiling::TilingEvictionTileIterator iterator_; |
| 85 size_t iterator_index_; | 101 int tiling_index_; |
|
reveman
2014/07/29 21:41:33
nit: current_tiling_
btw, might be cleaner to mai
vmpstr
2014/07/30 00:18:52
I changed it to current_tiling_index_. I would pre
reveman
2014/07/30 16:06:48
Acknowledged.
| |
| 86 TilePriority::PriorityBin iteration_stage_; | 102 TilePriority::PriorityBin iteration_stage_; |
|
reveman
2014/07/29 21:41:33
Maybe add something like this to make it clear tha
vmpstr
2014/07/30 00:18:52
Done.
| |
| 103 TilingIterationRange ranges_[NUM_RANGE_TYPES]; | |
| 104 int range_index_; | |
|
reveman
2014/07/29 21:41:33
nit: current_range_
and "TilingSet::TilingRangeTy
vmpstr
2014/07/30 00:18:52
Likewise I changed it to current_range_type_
reveman
2014/07/30 16:06:48
Acknowledged.
| |
| 87 bool required_for_activation_; | 105 bool required_for_activation_; |
| 106 TreePriority tree_priority_; | |
| 88 | 107 |
| 89 PictureLayerImpl* layer_; | 108 PictureLayerImpl* layer_; |
| 90 }; | 109 }; |
| 91 | 110 |
| 92 static scoped_ptr<PictureLayerImpl> Create(LayerTreeImpl* tree_impl, int id) { | 111 static scoped_ptr<PictureLayerImpl> Create(LayerTreeImpl* tree_impl, int id) { |
| 93 return make_scoped_ptr(new PictureLayerImpl(tree_impl, id)); | 112 return make_scoped_ptr(new PictureLayerImpl(tree_impl, id)); |
| 94 } | 113 } |
| 95 virtual ~PictureLayerImpl(); | 114 virtual ~PictureLayerImpl(); |
| 96 | 115 |
| 97 // LayerImpl overrides. | 116 // LayerImpl overrides. |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 217 gfx::Size viewport_size_for_tile_priority_; | 236 gfx::Size viewport_size_for_tile_priority_; |
| 218 gfx::Transform screen_space_transform_for_tile_priority_; | 237 gfx::Transform screen_space_transform_for_tile_priority_; |
| 219 | 238 |
| 220 friend class PictureLayer; | 239 friend class PictureLayer; |
| 221 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); | 240 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); |
| 222 }; | 241 }; |
| 223 | 242 |
| 224 } // namespace cc | 243 } // namespace cc |
| 225 | 244 |
| 226 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 245 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
| OLD | NEW |