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 <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 private: | 94 private: |
95 enum Phase { | 95 enum Phase { |
96 VISIBLE_RECT, | 96 VISIBLE_RECT, |
97 SKEWPORT_RECT, | 97 SKEWPORT_RECT, |
98 SOON_BORDER_RECT, | 98 SOON_BORDER_RECT, |
99 EVENTUALLY_RECT | 99 EVENTUALLY_RECT |
100 }; | 100 }; |
101 | 101 |
102 void AdvancePhase(); | 102 void AdvancePhase(); |
103 bool TileNeedsRaster(Tile* tile) const { | 103 bool TileNeedsRaster(Tile* tile) const { |
104 RasterMode mode = tile->DetermineRasterModeForTree(tree_); | 104 return !tile->is_occluded(tree_) && !tile->IsReadyToDraw(); |
105 return !tile->is_occluded(tree_) && tile->NeedsRasterForMode(mode); | |
106 } | 105 } |
107 | 106 |
108 PictureLayerTiling* tiling_; | 107 PictureLayerTiling* tiling_; |
109 | 108 |
110 Phase phase_; | 109 Phase phase_; |
111 WhichTree tree_; | 110 WhichTree tree_; |
112 | 111 |
113 Tile* current_tile_; | 112 Tile* current_tile_; |
114 TilingData::Iterator visible_iterator_; | 113 TilingData::Iterator visible_iterator_; |
115 TilingData::SpiralDifferenceIterator spiral_iterator_; | 114 TilingData::SpiralDifferenceIterator spiral_iterator_; |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 | 356 |
358 private: | 357 private: |
359 DISALLOW_ASSIGN(PictureLayerTiling); | 358 DISALLOW_ASSIGN(PictureLayerTiling); |
360 | 359 |
361 RectExpansionCache expansion_cache_; | 360 RectExpansionCache expansion_cache_; |
362 }; | 361 }; |
363 | 362 |
364 } // namespace cc | 363 } // namespace cc |
365 | 364 |
366 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ | 365 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ |
OLD | NEW |