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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 friend class TilingRasterTileIterator; | 291 friend class TilingRasterTileIterator; |
292 friend class TilingEvictionTileIterator; | 292 friend class TilingEvictionTileIterator; |
293 | 293 |
294 typedef std::pair<int, int> TileMapKey; | 294 typedef std::pair<int, int> TileMapKey; |
295 typedef base::hash_map<TileMapKey, scoped_refptr<Tile> > TileMap; | 295 typedef base::hash_map<TileMapKey, scoped_refptr<Tile> > TileMap; |
296 | 296 |
297 PictureLayerTiling(float contents_scale, | 297 PictureLayerTiling(float contents_scale, |
298 const gfx::Size& layer_bounds, | 298 const gfx::Size& layer_bounds, |
299 PictureLayerTilingClient* client); | 299 PictureLayerTilingClient* client); |
300 void SetLiveTilesRect(const gfx::Rect& live_tiles_rect); | 300 void SetLiveTilesRect(const gfx::Rect& live_tiles_rect); |
| 301 void VerifyLiveTilesRect(); |
301 Tile* CreateTile(int i, int j, const PictureLayerTiling* twin_tiling); | 302 Tile* CreateTile(int i, int j, const PictureLayerTiling* twin_tiling); |
302 // Returns true if the Tile existed and was removed from the tiling. | 303 // Returns true if the Tile existed and was removed from the tiling. |
303 bool RemoveTileAt(int i, int j, PictureLayerTiling* recycled_twin); | 304 bool RemoveTileAt(int i, int j, PictureLayerTiling* recycled_twin); |
304 | 305 |
305 // Computes a skewport. The calculation extrapolates the last visible | 306 // Computes a skewport. The calculation extrapolates the last visible |
306 // rect and the current visible rect to expand the skewport to where it | 307 // rect and the current visible rect to expand the skewport to where it |
307 // would be in |skewport_target_time| seconds. Note that the skewport | 308 // would be in |skewport_target_time| seconds. Note that the skewport |
308 // is guaranteed to contain the current visible rect. | 309 // is guaranteed to contain the current visible rect. |
309 gfx::Rect ComputeSkewport(double current_frame_time_in_seconds, | 310 gfx::Rect ComputeSkewport(double current_frame_time_in_seconds, |
310 const gfx::Rect& visible_rect_in_content_space) | 311 const gfx::Rect& visible_rect_in_content_space) |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 | 361 |
361 private: | 362 private: |
362 DISALLOW_ASSIGN(PictureLayerTiling); | 363 DISALLOW_ASSIGN(PictureLayerTiling); |
363 | 364 |
364 RectExpansionCache expansion_cache_; | 365 RectExpansionCache expansion_cache_; |
365 }; | 366 }; |
366 | 367 |
367 } // namespace cc | 368 } // namespace cc |
368 | 369 |
369 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ | 370 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ |
OLD | NEW |