| 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 <map> | 8 #include <map> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 PictureLayerTiling(WhichTree tree, | 226 PictureLayerTiling(WhichTree tree, |
| 227 float contents_scale, | 227 float contents_scale, |
| 228 scoped_refptr<RasterSource> raster_source, | 228 scoped_refptr<RasterSource> raster_source, |
| 229 PictureLayerTilingClient* client, | 229 PictureLayerTilingClient* client, |
| 230 size_t max_tiles_for_interest_area, | 230 size_t max_tiles_for_interest_area, |
| 231 float skewport_target_time_in_seconds, | 231 float skewport_target_time_in_seconds, |
| 232 int skewport_extrapolation_limit_in_content_pixels); | 232 int skewport_extrapolation_limit_in_content_pixels); |
| 233 void SetLiveTilesRect(const gfx::Rect& live_tiles_rect); | 233 void SetLiveTilesRect(const gfx::Rect& live_tiles_rect); |
| 234 void VerifyLiveTilesRect(bool is_on_recycle_tree) const; | 234 void VerifyLiveTilesRect(bool is_on_recycle_tree) const; |
| 235 Tile* CreateTile(int i, int j); | 235 Tile* CreateTile(int i, int j); |
| 236 // Returns true if the Tile existed and was removed from the tiling. | 236 // Returns true if the Tile existed and was removed from the tiling. If true, |
| 237 bool RemoveTileAt(int i, int j); | 237 // and |id| is not null, sets |id| to that of the removed Tile. |
| 238 bool RemoveTileAt(int i, int j, Tile::Id* id); |
| 238 bool TilingMatchesTileIndices(const PictureLayerTiling* twin) const; | 239 bool TilingMatchesTileIndices(const PictureLayerTiling* twin) const; |
| 239 | 240 |
| 240 // Computes a skewport. The calculation extrapolates the last visible | 241 // Computes a skewport. The calculation extrapolates the last visible |
| 241 // rect and the current visible rect to expand the skewport to where it | 242 // rect and the current visible rect to expand the skewport to where it |
| 242 // would be in |skewport_target_time| seconds. Note that the skewport | 243 // would be in |skewport_target_time| seconds. Note that the skewport |
| 243 // is guaranteed to contain the current visible rect. | 244 // is guaranteed to contain the current visible rect. |
| 244 gfx::Rect ComputeSkewport(double current_frame_time_in_seconds, | 245 gfx::Rect ComputeSkewport(double current_frame_time_in_seconds, |
| 245 const gfx::Rect& visible_rect_in_content_space) | 246 const gfx::Rect& visible_rect_in_content_space) |
| 246 const; | 247 const; |
| 247 | 248 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 | 348 |
| 348 private: | 349 private: |
| 349 DISALLOW_ASSIGN(PictureLayerTiling); | 350 DISALLOW_ASSIGN(PictureLayerTiling); |
| 350 | 351 |
| 351 RectExpansionCache expansion_cache_; | 352 RectExpansionCache expansion_cache_; |
| 352 }; | 353 }; |
| 353 | 354 |
| 354 } // namespace cc | 355 } // namespace cc |
| 355 | 356 |
| 356 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ | 357 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ |
| OLD | NEW |