| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 virtual WhichTree GetTree() const = 0; | 50 virtual WhichTree GetTree() const = 0; |
| 51 | 51 |
| 52 protected: | 52 protected: |
| 53 virtual ~PictureLayerTilingClient() {} | 53 virtual ~PictureLayerTilingClient() {} |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 class CC_EXPORT PictureLayerTiling { | 56 class CC_EXPORT PictureLayerTiling { |
| 57 public: | 57 public: |
| 58 enum EvictionCategory { | 58 enum EvictionCategory { |
| 59 EVENTUALLY, | 59 EVENTUALLY, |
| 60 EVENTUALLY_AND_REQUIRED_FOR_ACTIVATION, |
| 60 SOON, | 61 SOON, |
| 62 SOON_AND_REQUIRED_FOR_ACTIVATION, |
| 61 NOW, | 63 NOW, |
| 62 NOW_AND_REQUIRED_FOR_ACTIVATION | 64 NOW_AND_REQUIRED_FOR_ACTIVATION |
| 63 }; | 65 }; |
| 66 |
| 64 class CC_EXPORT TilingRasterTileIterator { | 67 class CC_EXPORT TilingRasterTileIterator { |
| 65 public: | 68 public: |
| 66 TilingRasterTileIterator(); | 69 TilingRasterTileIterator(); |
| 67 TilingRasterTileIterator(PictureLayerTiling* tiling, WhichTree tree); | 70 TilingRasterTileIterator(PictureLayerTiling* tiling, WhichTree tree); |
| 68 ~TilingRasterTileIterator(); | 71 ~TilingRasterTileIterator(); |
| 69 | 72 |
| 70 operator bool() const { return !!current_tile_; } | 73 operator bool() const { return !!current_tile_; } |
| 71 const Tile* operator*() const { return current_tile_; } | 74 const Tile* operator*() const { return current_tile_; } |
| 72 Tile* operator*() { return current_tile_; } | 75 Tile* operator*() { return current_tile_; } |
| 73 TilePriority::PriorityBin get_type() const { | 76 TilePriority::PriorityBin get_type() const { |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 gfx::Rect current_visible_rect_; | 332 gfx::Rect current_visible_rect_; |
| 330 gfx::Rect current_skewport_rect_; | 333 gfx::Rect current_skewport_rect_; |
| 331 gfx::Rect current_soon_border_rect_; | 334 gfx::Rect current_soon_border_rect_; |
| 332 gfx::Rect current_eventually_rect_; | 335 gfx::Rect current_eventually_rect_; |
| 333 | 336 |
| 334 bool has_visible_rect_tiles_; | 337 bool has_visible_rect_tiles_; |
| 335 bool has_skewport_rect_tiles_; | 338 bool has_skewport_rect_tiles_; |
| 336 bool has_soon_border_rect_tiles_; | 339 bool has_soon_border_rect_tiles_; |
| 337 bool has_eventually_rect_tiles_; | 340 bool has_eventually_rect_tiles_; |
| 338 | 341 |
| 339 std::vector<Tile*> eventually_eviction_tiles_; | 342 // TODO(reveman): Remove this in favour of an array of eviction_tiles_ when we |
| 340 std::vector<Tile*> soon_eviction_tiles_; | 343 // change all enums to have a consistent way of getting the count/last |
| 341 std::vector<Tile*> now_eviction_tiles_; | 344 // element. |
| 342 std::vector<Tile*> now_and_required_for_activation_eviction_tiles_; | 345 std::vector<Tile*> eviction_tiles_now_; |
| 346 std::vector<Tile*> eviction_tiles_now_and_required_for_activation_; |
| 347 std::vector<Tile*> eviction_tiles_soon_; |
| 348 std::vector<Tile*> eviction_tiles_soon_and_required_for_activation_; |
| 349 std::vector<Tile*> eviction_tiles_eventually_; |
| 350 std::vector<Tile*> eviction_tiles_eventually_and_required_for_activation_; |
| 351 |
| 343 bool eviction_tiles_cache_valid_; | 352 bool eviction_tiles_cache_valid_; |
| 344 TreePriority eviction_cache_tree_priority_; | 353 TreePriority eviction_cache_tree_priority_; |
| 345 | 354 |
| 346 private: | 355 private: |
| 347 DISALLOW_ASSIGN(PictureLayerTiling); | 356 DISALLOW_ASSIGN(PictureLayerTiling); |
| 348 | 357 |
| 349 RectExpansionCache expansion_cache_; | 358 RectExpansionCache expansion_cache_; |
| 350 }; | 359 }; |
| 351 | 360 |
| 352 } // namespace cc | 361 } // namespace cc |
| 353 | 362 |
| 354 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ | 363 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ |
| OLD | NEW |