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