| 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 void RemoveTileAt(int i, int j); | 303 // Returns true if the Tile existed and was removed from the tiling. |
| 304 bool RemoveTileAt(int i, int j, PictureLayerTiling* recycled_twin); |
| 303 | 305 |
| 304 // Computes a skewport. The calculation extrapolates the last visible | 306 // Computes a skewport. The calculation extrapolates the last visible |
| 305 // 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 |
| 306 // would be in |skewport_target_time| seconds. Note that the skewport | 308 // would be in |skewport_target_time| seconds. Note that the skewport |
| 307 // is guaranteed to contain the current visible rect. | 309 // is guaranteed to contain the current visible rect. |
| 308 gfx::Rect ComputeSkewport(double current_frame_time_in_seconds, | 310 gfx::Rect ComputeSkewport(double current_frame_time_in_seconds, |
| 309 const gfx::Rect& visible_rect_in_content_space) | 311 const gfx::Rect& visible_rect_in_content_space) |
| 310 const; | 312 const; |
| 311 | 313 |
| 312 void UpdateEvictionCacheIfNeeded(TreePriority tree_priority); | 314 void UpdateEvictionCacheIfNeeded(TreePriority tree_priority); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 | 361 |
| 360 private: | 362 private: |
| 361 DISALLOW_ASSIGN(PictureLayerTiling); | 363 DISALLOW_ASSIGN(PictureLayerTiling); |
| 362 | 364 |
| 363 RectExpansionCache expansion_cache_; | 365 RectExpansionCache expansion_cache_; |
| 364 }; | 366 }; |
| 365 | 367 |
| 366 } // namespace cc | 368 } // namespace cc |
| 367 | 369 |
| 368 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ | 370 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ |
| OLD | NEW |