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 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 enum { NUM_EVICTION_CATEGORIES = NOW_AND_REQUIRED_FOR_ACTIVATION + 1 }; | |
|
vmpstr
2014/08/14 06:23:48
I'm not sure what our style guide says about enums
reveman
2014/08/14 09:01:50
We don't have a nice consistent mechanism for this
danakj
2014/08/14 16:55:26
Security team (tsepez) has been adding a LAST_FOO_
vmpstr
2014/08/14 22:05:50
Removed this for now, added a TODO instead.
| |
| 67 | |
| 64 class CC_EXPORT TilingRasterTileIterator { | 68 class CC_EXPORT TilingRasterTileIterator { |
| 65 public: | 69 public: |
| 66 TilingRasterTileIterator(); | 70 TilingRasterTileIterator(); |
| 67 TilingRasterTileIterator(PictureLayerTiling* tiling, WhichTree tree); | 71 TilingRasterTileIterator(PictureLayerTiling* tiling, WhichTree tree); |
| 68 ~TilingRasterTileIterator(); | 72 ~TilingRasterTileIterator(); |
| 69 | 73 |
| 70 operator bool() const { return !!current_tile_; } | 74 operator bool() const { return !!current_tile_; } |
| 71 const Tile* operator*() const { return current_tile_; } | 75 const Tile* operator*() const { return current_tile_; } |
| 72 Tile* operator*() { return current_tile_; } | 76 Tile* operator*() { return current_tile_; } |
| 73 TilePriority::PriorityBin get_type() const { | 77 TilePriority::PriorityBin get_type() const { |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 329 gfx::Rect current_visible_rect_; | 333 gfx::Rect current_visible_rect_; |
| 330 gfx::Rect current_skewport_rect_; | 334 gfx::Rect current_skewport_rect_; |
| 331 gfx::Rect current_soon_border_rect_; | 335 gfx::Rect current_soon_border_rect_; |
| 332 gfx::Rect current_eventually_rect_; | 336 gfx::Rect current_eventually_rect_; |
| 333 | 337 |
| 334 bool has_visible_rect_tiles_; | 338 bool has_visible_rect_tiles_; |
| 335 bool has_skewport_rect_tiles_; | 339 bool has_skewport_rect_tiles_; |
| 336 bool has_soon_border_rect_tiles_; | 340 bool has_soon_border_rect_tiles_; |
| 337 bool has_eventually_rect_tiles_; | 341 bool has_eventually_rect_tiles_; |
| 338 | 342 |
| 339 std::vector<Tile*> eventually_eviction_tiles_; | 343 std::vector<Tile*> eviction_tiles_[NUM_EVICTION_CATEGORIES]; |
| 340 std::vector<Tile*> soon_eviction_tiles_; | |
| 341 std::vector<Tile*> now_eviction_tiles_; | |
| 342 std::vector<Tile*> now_and_required_for_activation_eviction_tiles_; | |
| 343 bool eviction_tiles_cache_valid_; | 344 bool eviction_tiles_cache_valid_; |
| 344 TreePriority eviction_cache_tree_priority_; | 345 TreePriority eviction_cache_tree_priority_; |
| 345 | 346 |
| 346 private: | 347 private: |
| 347 DISALLOW_ASSIGN(PictureLayerTiling); | 348 DISALLOW_ASSIGN(PictureLayerTiling); |
| 348 | 349 |
| 349 RectExpansionCache expansion_cache_; | 350 RectExpansionCache expansion_cache_; |
| 350 }; | 351 }; |
| 351 | 352 |
| 352 } // namespace cc | 353 } // namespace cc |
| 353 | 354 |
| 354 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ | 355 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ |
| OLD | NEW |