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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 } | 67 } |
68 return tiling_->tiling_data_.TileBounds(spiral_iterator_.index_x(), | 68 return tiling_->tiling_data_.TileBounds(spiral_iterator_.index_x(), |
69 spiral_iterator_.index_y()); | 69 spiral_iterator_.index_y()); |
70 } | 70 } |
71 | 71 |
72 private: | 72 private: |
73 void AdvancePhase(); | 73 void AdvancePhase(); |
74 bool TileNeedsRaster(Tile* tile) const { | 74 bool TileNeedsRaster(Tile* tile) const { |
75 RasterMode mode = tile->DetermineRasterModeForTree(tree_); | 75 RasterMode mode = tile->DetermineRasterModeForTree(tree_); |
76 return tile->NeedsRasterForMode(mode); | 76 return tile->NeedsRasterForMode(mode); |
77 }; | 77 } |
78 | 78 |
79 PictureLayerTiling* tiling_; | 79 PictureLayerTiling* tiling_; |
80 | 80 |
81 TilePriority::PriorityBin type_; | 81 TilePriority::PriorityBin type_; |
82 gfx::Rect visible_rect_in_content_space_; | 82 gfx::Rect visible_rect_in_content_space_; |
83 gfx::Rect skewport_in_content_space_; | 83 gfx::Rect skewport_in_content_space_; |
84 gfx::Rect eventually_rect_in_content_space_; | 84 gfx::Rect eventually_rect_in_content_space_; |
85 gfx::Rect soon_border_rect_in_content_space_; | 85 gfx::Rect soon_border_rect_in_content_space_; |
86 WhichTree tree_; | 86 WhichTree tree_; |
87 | 87 |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 int tile_i_; | 201 int tile_i_; |
202 int tile_j_; | 202 int tile_j_; |
203 int left_; | 203 int left_; |
204 int top_; | 204 int top_; |
205 int right_; | 205 int right_; |
206 int bottom_; | 206 int bottom_; |
207 | 207 |
208 friend class PictureLayerTiling; | 208 friend class PictureLayerTiling; |
209 }; | 209 }; |
210 | 210 |
211 Region OpaqueRegionInContentRect(const gfx::Rect& content_rect) const; | |
212 | |
213 void Reset(); | 211 void Reset(); |
214 | 212 |
215 void UpdateTilePriorities(WhichTree tree, | 213 void UpdateTilePriorities(WhichTree tree, |
216 const gfx::Rect& visible_layer_rect, | 214 const gfx::Rect& visible_layer_rect, |
217 float layer_contents_scale, | 215 float layer_contents_scale, |
218 double current_frame_time_in_seconds); | 216 double current_frame_time_in_seconds); |
219 | 217 |
220 // Copies the src_tree priority into the dst_tree priority for all tiles. | 218 // Copies the src_tree priority into the dst_tree priority for all tiles. |
221 // The src_tree priority is reset to the lowest priority possible. This | 219 // The src_tree priority is reset to the lowest priority possible. This |
222 // also updates the pile on each tile to be the current client's pile. | 220 // also updates the pile on each tile to be the current client's pile. |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 | 307 |
310 private: | 308 private: |
311 DISALLOW_ASSIGN(PictureLayerTiling); | 309 DISALLOW_ASSIGN(PictureLayerTiling); |
312 | 310 |
313 RectExpansionCache expansion_cache_; | 311 RectExpansionCache expansion_cache_; |
314 }; | 312 }; |
315 | 313 |
316 } // namespace cc | 314 } // namespace cc |
317 | 315 |
318 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ | 316 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ |
OLD | NEW |