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_RESOURCES_PICTURE_LAYER_TILING_H_ | 5 #ifndef CC_RESOURCES_PICTURE_LAYER_TILING_H_ |
| 6 #define CC_RESOURCES_PICTURE_LAYER_TILING_H_ | 6 #define CC_RESOURCES_PICTURE_LAYER_TILING_H_ |
| 7 | 7 |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 94 | 94 |
| 95 Tile* current_tile_; | 95 Tile* current_tile_; |
| 96 TilingData::Iterator visible_iterator_; | 96 TilingData::Iterator visible_iterator_; |
| 97 TilingData::SpiralDifferenceIterator spiral_iterator_; | 97 TilingData::SpiralDifferenceIterator spiral_iterator_; |
| 98 }; | 98 }; |
| 99 | 99 |
| 100 class CC_EXPORT TilingEvictionTileIterator { | 100 class CC_EXPORT TilingEvictionTileIterator { |
| 101 public: | 101 public: |
| 102 TilingEvictionTileIterator(); | 102 TilingEvictionTileIterator(); |
| 103 TilingEvictionTileIterator(PictureLayerTiling* tiling, | 103 TilingEvictionTileIterator(PictureLayerTiling* tiling, |
| 104 TreePriority tree_priority); | 104 TreePriority tree_priority, |
| 105 TilePriority::PriorityBin type, | |
| 106 bool required_for_activation); | |
| 105 ~TilingEvictionTileIterator(); | 107 ~TilingEvictionTileIterator(); |
| 106 | 108 |
| 107 operator bool() const; | 109 operator bool() const; |
| 108 const Tile* operator*() const; | 110 const Tile* operator*() const; |
| 109 Tile* operator*(); | 111 Tile* operator*(); |
| 110 TilingEvictionTileIterator& operator++(); | 112 TilingEvictionTileIterator& operator++(); |
| 111 TilePriority::PriorityBin get_type() { | |
| 112 DCHECK(*this); | |
| 113 const TilePriority& priority = | |
| 114 (*tile_iterator_)->priority_for_tree_priority(tree_priority_); | |
| 115 return priority.priority_bin; | |
| 116 } | |
| 117 | 113 |
| 118 private: | 114 private: |
| 119 PictureLayerTiling* tiling_; | 115 PictureLayerTiling* tiling_; |
| 120 TreePriority tree_priority_; | 116 TreePriority tree_priority_; |
| 121 std::vector<Tile*>::iterator tile_iterator_; | 117 std::vector<Tile*>::iterator tile_iterator_; |
| 118 std::vector<Tile*>* eviction_tiles_; | |
|
reveman
2014/07/30 16:06:48
what is this for?
vmpstr
2014/07/30 20:06:39
In the iterator, we iterate one of the vectors on
| |
| 122 }; | 119 }; |
| 123 | 120 |
| 124 ~PictureLayerTiling(); | 121 ~PictureLayerTiling(); |
| 125 | 122 |
| 126 // Create a tiling with no tiles. CreateTiles must be called to add some. | 123 // Create a tiling with no tiles. CreateTiles must be called to add some. |
| 127 static scoped_ptr<PictureLayerTiling> Create( | 124 static scoped_ptr<PictureLayerTiling> Create( |
| 128 float contents_scale, | 125 float contents_scale, |
| 129 const gfx::Size& layer_bounds, | 126 const gfx::Size& layer_bounds, |
| 130 PictureLayerTilingClient* client); | 127 PictureLayerTilingClient* client); |
| 131 gfx::Size layer_bounds() const { return layer_bounds_; } | 128 gfx::Size layer_bounds() const { return layer_bounds_; } |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 308 gfx::Rect current_visible_rect_; | 305 gfx::Rect current_visible_rect_; |
| 309 gfx::Rect current_skewport_rect_; | 306 gfx::Rect current_skewport_rect_; |
| 310 gfx::Rect current_soon_border_rect_; | 307 gfx::Rect current_soon_border_rect_; |
| 311 gfx::Rect current_eventually_rect_; | 308 gfx::Rect current_eventually_rect_; |
| 312 | 309 |
| 313 bool has_visible_rect_tiles_; | 310 bool has_visible_rect_tiles_; |
| 314 bool has_skewport_rect_tiles_; | 311 bool has_skewport_rect_tiles_; |
| 315 bool has_soon_border_rect_tiles_; | 312 bool has_soon_border_rect_tiles_; |
| 316 bool has_eventually_rect_tiles_; | 313 bool has_eventually_rect_tiles_; |
| 317 | 314 |
| 318 std::vector<Tile*> eviction_tiles_cache_; | 315 std::vector<Tile*> eventually_eviction_tiles_; |
| 316 std::vector<Tile*> soon_eviction_tiles_; | |
| 317 std::vector<Tile*> now_required_for_activation_eviction_tiles_; | |
| 318 std::vector<Tile*> now_not_required_for_activation_eviction_tiles_; | |
| 319 bool eviction_tiles_cache_valid_; | 319 bool eviction_tiles_cache_valid_; |
| 320 TreePriority eviction_cache_tree_priority_; | 320 TreePriority eviction_cache_tree_priority_; |
| 321 | 321 |
| 322 private: | 322 private: |
| 323 DISALLOW_ASSIGN(PictureLayerTiling); | 323 DISALLOW_ASSIGN(PictureLayerTiling); |
| 324 | 324 |
| 325 RectExpansionCache expansion_cache_; | 325 RectExpansionCache expansion_cache_; |
| 326 }; | 326 }; |
| 327 | 327 |
| 328 } // namespace cc | 328 } // namespace cc |
| 329 | 329 |
| 330 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ | 330 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ |
| OLD | NEW |