| 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_TILES_PICTURE_LAYER_TILING_SET_H_ | 5 #ifndef CC_TILES_PICTURE_LAYER_TILING_SET_H_ |
| 6 #define CC_TILES_PICTURE_LAYER_TILING_SET_H_ | 6 #define CC_TILES_PICTURE_LAYER_TILING_SET_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <list> | 10 #include <list> |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 // |start_scale|. If multiple tilings match the criteria, return the one with | 98 // |start_scale|. If multiple tilings match the criteria, return the one with |
| 99 // the least ratio to |start_scale|. | 99 // the least ratio to |start_scale|. |
| 100 float GetSnappedContentsScaleKey(float start_scale, | 100 float GetSnappedContentsScaleKey(float start_scale, |
| 101 float snap_to_existing_tiling_ratio) const; | 101 float snap_to_existing_tiling_ratio) const; |
| 102 | 102 |
| 103 // Returns the maximum contents scale of all tilings, or 0 if no tilings | 103 // Returns the maximum contents scale of all tilings, or 0 if no tilings |
| 104 // exist. Note that this returns the maximum of x and y scales depending on | 104 // exist. Note that this returns the maximum of x and y scales depending on |
| 105 // the aspect ratio. | 105 // the aspect ratio. |
| 106 float GetMaximumContentsScale() const; | 106 float GetMaximumContentsScale() const; |
| 107 | 107 |
| 108 // Remove one tiling. |
| 109 void Remove(PictureLayerTiling* tiling); |
| 110 |
| 108 // Removes all tilings with a contents scale key < |minimum_scale_key|. | 111 // Removes all tilings with a contents scale key < |minimum_scale_key|. |
| 109 void RemoveTilingsBelowScaleKey(float minimum_scale_key); | 112 void RemoveTilingsBelowScaleKey(float minimum_scale_key); |
| 110 | 113 |
| 111 // Removes all tilings with a contents scale key > |maximum_scale_key|. | 114 // Removes all tilings with a contents scale key > |maximum_scale_key|. |
| 112 void RemoveTilingsAboveScaleKey(float maximum_scale); | 115 void RemoveTilingsAboveScaleKey(float maximum_scale); |
| 113 | 116 |
| 114 // Remove all tilings. | 117 // Remove all tilings. |
| 115 void RemoveAllTilings(); | 118 void RemoveAllTilings(); |
| 116 | 119 |
| 117 // Remove all tiles; keep all tilings. | 120 // Remove all tiles; keep all tilings. |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 int tiling_interest_area_padding, | 223 int tiling_interest_area_padding, |
| 221 float skewport_target_time_in_seconds, | 224 float skewport_target_time_in_seconds, |
| 222 int skewport_extrapolation_limit_in_screen_pixels, | 225 int skewport_extrapolation_limit_in_screen_pixels, |
| 223 float max_preraster_distance); | 226 float max_preraster_distance); |
| 224 | 227 |
| 225 void CopyTilingsAndPropertiesFromPendingTwin( | 228 void CopyTilingsAndPropertiesFromPendingTwin( |
| 226 const PictureLayerTilingSet* pending_twin_set, | 229 const PictureLayerTilingSet* pending_twin_set, |
| 227 scoped_refptr<RasterSource> raster_source, | 230 scoped_refptr<RasterSource> raster_source, |
| 228 const Region& layer_invalidation); | 231 const Region& layer_invalidation); |
| 229 | 232 |
| 230 // Remove one tiling. | |
| 231 void Remove(PictureLayerTiling* tiling); | |
| 232 void VerifyTilings(const PictureLayerTilingSet* pending_twin_set) const; | 233 void VerifyTilings(const PictureLayerTilingSet* pending_twin_set) const; |
| 233 | 234 |
| 234 bool TilingsNeedUpdate(const gfx::Rect& required_rect_in_layer_space, | 235 bool TilingsNeedUpdate(const gfx::Rect& required_rect_in_layer_space, |
| 235 double current_frame_time_in_Seconds); | 236 double current_frame_time_in_Seconds); |
| 236 gfx::Rect ComputeSkewport(const gfx::Rect& visible_rect_in_layer_space, | 237 gfx::Rect ComputeSkewport(const gfx::Rect& visible_rect_in_layer_space, |
| 237 double current_frame_time_in_seconds, | 238 double current_frame_time_in_seconds, |
| 238 float ideal_contents_scale); | 239 float ideal_contents_scale); |
| 239 gfx::Rect ComputeSoonBorderRect(const gfx::Rect& visible_rect_in_layer_space, | 240 gfx::Rect ComputeSoonBorderRect(const gfx::Rect& visible_rect_in_layer_space, |
| 240 float ideal_contents_scale); | 241 float ideal_contents_scale); |
| 241 void UpdatePriorityRects(const gfx::Rect& visible_rect_in_layer_space, | 242 void UpdatePriorityRects(const gfx::Rect& visible_rect_in_layer_space, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 266 | 267 |
| 267 friend class Iterator; | 268 friend class Iterator; |
| 268 | 269 |
| 269 private: | 270 private: |
| 270 DISALLOW_COPY_AND_ASSIGN(PictureLayerTilingSet); | 271 DISALLOW_COPY_AND_ASSIGN(PictureLayerTilingSet); |
| 271 }; | 272 }; |
| 272 | 273 |
| 273 } // namespace cc | 274 } // namespace cc |
| 274 | 275 |
| 275 #endif // CC_TILES_PICTURE_LAYER_TILING_SET_H_ | 276 #endif // CC_TILES_PICTURE_LAYER_TILING_SET_H_ |
| OLD | NEW |