| 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_PICTURE_LAYER_TILING_SET_H_ | 5 #ifndef CC_PICTURE_LAYER_TILING_SET_H_ |
| 6 #define CC_PICTURE_LAYER_TILING_SET_H_ | 6 #define CC_PICTURE_LAYER_TILING_SET_H_ |
| 7 | 7 |
| 8 #include "cc/picture_layer_tiling.h" | 8 #include "cc/picture_layer_tiling.h" |
| 9 #include "cc/region.h" | 9 #include "cc/region.h" |
| 10 #include "cc/scoped_ptr_vector.h" | 10 #include "cc/scoped_ptr_vector.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 void CloneFrom(const PictureLayerTilingSet& other); | 21 void CloneFrom(const PictureLayerTilingSet& other); |
| 22 | 22 |
| 23 void SetLayerBounds(gfx::Size layer_bounds); | 23 void SetLayerBounds(gfx::Size layer_bounds); |
| 24 gfx::Size LayerBounds() const; | 24 gfx::Size LayerBounds() const; |
| 25 | 25 |
| 26 void Invalidate(const Region& invalidation); | 26 void Invalidate(const Region& invalidation); |
| 27 | 27 |
| 28 void AddTiling(float contents_scale, gfx::Size tile_size); | 28 void AddTiling(float contents_scale, gfx::Size tile_size); |
| 29 size_t num_tilings() const { return tilings_.size(); } | 29 size_t num_tilings() const { return tilings_.size(); } |
| 30 | 30 |
| 31 void UpdateTilePriorities(const gfx::Size& view_port, |
| 32 const gfx::Transform& last_transform, |
| 33 const gfx::Transform& current_transform, |
| 34 double time_delta); |
| 35 |
| 31 // For a given rect, iterates through tiles that can fill it. If no | 36 // For a given rect, iterates through tiles that can fill it. If no |
| 32 // set of tiles with resources can fill the rect, then it will iterate | 37 // set of tiles with resources can fill the rect, then it will iterate |
| 33 // through null tiles with valid geometry_rect() until the rect is full. | 38 // through null tiles with valid geometry_rect() until the rect is full. |
| 34 // If all tiles have resources, the union of all geometry_rects will | 39 // If all tiles have resources, the union of all geometry_rects will |
| 35 // exactly fill rect with no overlap. | 40 // exactly fill rect with no overlap. |
| 36 class CC_EXPORT Iterator { | 41 class CC_EXPORT Iterator { |
| 37 public: | 42 public: |
| 38 Iterator(PictureLayerTilingSet* set, float contents_scale, gfx::Rect rect); | 43 Iterator(PictureLayerTilingSet* set, float contents_scale, gfx::Rect rect); |
| 39 ~Iterator(); | 44 ~Iterator(); |
| 40 | 45 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 67 PictureLayerTilingClient* client_; | 72 PictureLayerTilingClient* client_; |
| 68 gfx::Size layer_bounds_; | 73 gfx::Size layer_bounds_; |
| 69 ScopedPtrVector<PictureLayerTiling> tilings_; | 74 ScopedPtrVector<PictureLayerTiling> tilings_; |
| 70 | 75 |
| 71 friend class Iterator; | 76 friend class Iterator; |
| 72 }; | 77 }; |
| 73 | 78 |
| 74 } // namespace cc | 79 } // namespace cc |
| 75 | 80 |
| 76 #endif // CC_PICTURE_LAYER_TILING_SET_H_ | 81 #endif // CC_PICTURE_LAYER_TILING_SET_H_ |
| OLD | NEW |