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_SET_H_ | 5 #ifndef CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_ |
6 #define CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_ | 6 #define CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_ |
7 | 7 |
8 #include "cc/base/region.h" | 8 #include "cc/base/region.h" |
9 #include "cc/base/scoped_ptr_vector.h" | 9 #include "cc/base/scoped_ptr_vector.h" |
10 #include "cc/resources/picture_layer_tiling.h" | 10 #include "cc/resources/picture_layer_tiling.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 // Shallow copies all data (except client and bounds from other). | 22 // Shallow copies all data (except client and bounds from other). |
23 void CloneAll( | 23 void CloneAll( |
24 const PictureLayerTilingSet& other, | 24 const PictureLayerTilingSet& other, |
25 const Region& invalidation, | 25 const Region& invalidation, |
26 float minimum_contents_scale); | 26 float minimum_contents_scale); |
27 void Clone(const PictureLayerTiling* tiling, const Region& invalidation); | 27 void Clone(const PictureLayerTiling* tiling, const Region& invalidation); |
28 | 28 |
29 void SetLayerBounds(gfx::Size layer_bounds); | 29 void SetLayerBounds(gfx::Size layer_bounds); |
30 gfx::Size LayerBounds() const; | 30 gfx::Size LayerBounds() const; |
31 | 31 |
32 void Invalidate(const Region& layer_invalidation); | 32 void Invalidate(const Region& layer_invalidation); |
33 | 33 |
34 PictureLayerTiling* AddTiling(float contents_scale); | 34 PictureLayerTiling* AddTiling(float contents_scale); |
35 size_t num_tilings() const { return tilings_.size(); } | 35 size_t num_tilings() const { return tilings_.size(); } |
36 PictureLayerTiling* tiling_at(size_t idx) { return tilings_[idx]; } | 36 PictureLayerTiling* tiling_at(size_t idx) { return tilings_[idx]; } |
37 const PictureLayerTiling* tiling_at(size_t idx) const { | 37 const PictureLayerTiling* tiling_at(size_t idx) const { |
38 return tilings_[idx]; | 38 return tilings_[idx]; |
39 } | 39 } |
40 | 40 |
41 // Remove all tilings. | 41 // Remove all tilings. |
42 void RemoveAllTilings(); | 42 void RemoveAllTilings(); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 PictureLayerTilingClient* client_; | 116 PictureLayerTilingClient* client_; |
117 gfx::Size layer_bounds_; | 117 gfx::Size layer_bounds_; |
118 ScopedPtrVector<PictureLayerTiling> tilings_; | 118 ScopedPtrVector<PictureLayerTiling> tilings_; |
119 | 119 |
120 friend class Iterator; | 120 friend class Iterator; |
121 }; | 121 }; |
122 | 122 |
123 } // namespace cc | 123 } // namespace cc |
124 | 124 |
125 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_ | 125 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_ |
OLD | NEW |