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 <set> | 10 #include <set> |
(...skipping 21 matching lines...) Expand all Loading... |
32 LOW_RES, | 32 LOW_RES, |
33 LOWER_THAN_LOW_RES | 33 LOWER_THAN_LOW_RES |
34 }; | 34 }; |
35 struct TilingRange { | 35 struct TilingRange { |
36 TilingRange(size_t start, size_t end) : start(start), end(end) {} | 36 TilingRange(size_t start, size_t end) : start(start), end(end) {} |
37 | 37 |
38 size_t start; | 38 size_t start; |
39 size_t end; | 39 size_t end; |
40 }; | 40 }; |
41 | 41 |
42 static scoped_ptr<PictureLayerTilingSet> Create( | 42 static std::unique_ptr<PictureLayerTilingSet> Create( |
43 WhichTree tree, | 43 WhichTree tree, |
44 PictureLayerTilingClient* client, | 44 PictureLayerTilingClient* client, |
45 size_t tiling_interest_area_padding, | 45 size_t tiling_interest_area_padding, |
46 float skewport_target_time_in_seconds, | 46 float skewport_target_time_in_seconds, |
47 int skewport_extrapolation_limit_in_content); | 47 int skewport_extrapolation_limit_in_content); |
48 | 48 |
49 ~PictureLayerTilingSet(); | 49 ~PictureLayerTilingSet(); |
50 | 50 |
51 const PictureLayerTilingClient* client() const { return client_; } | 51 const PictureLayerTilingClient* client() const { return client_; } |
52 | 52 |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 | 182 |
183 void CopyTilingsAndPropertiesFromPendingTwin( | 183 void CopyTilingsAndPropertiesFromPendingTwin( |
184 const PictureLayerTilingSet* pending_twin_set, | 184 const PictureLayerTilingSet* pending_twin_set, |
185 scoped_refptr<RasterSource> raster_source, | 185 scoped_refptr<RasterSource> raster_source, |
186 const Region& layer_invalidation); | 186 const Region& layer_invalidation); |
187 | 187 |
188 // Remove one tiling. | 188 // Remove one tiling. |
189 void Remove(PictureLayerTiling* tiling); | 189 void Remove(PictureLayerTiling* tiling); |
190 void VerifyTilings(const PictureLayerTilingSet* pending_twin_set) const; | 190 void VerifyTilings(const PictureLayerTilingSet* pending_twin_set) const; |
191 | 191 |
192 std::vector<scoped_ptr<PictureLayerTiling>> tilings_; | 192 std::vector<std::unique_ptr<PictureLayerTiling>> tilings_; |
193 | 193 |
194 const size_t tiling_interest_area_padding_; | 194 const size_t tiling_interest_area_padding_; |
195 const float skewport_target_time_in_seconds_; | 195 const float skewport_target_time_in_seconds_; |
196 const int skewport_extrapolation_limit_in_content_pixels_; | 196 const int skewport_extrapolation_limit_in_content_pixels_; |
197 WhichTree tree_; | 197 WhichTree tree_; |
198 PictureLayerTilingClient* client_; | 198 PictureLayerTilingClient* client_; |
199 | 199 |
200 friend class Iterator; | 200 friend class Iterator; |
201 DISALLOW_COPY_AND_ASSIGN(PictureLayerTilingSet); | 201 DISALLOW_COPY_AND_ASSIGN(PictureLayerTilingSet); |
202 }; | 202 }; |
203 | 203 |
204 } // namespace cc | 204 } // namespace cc |
205 | 205 |
206 #endif // CC_TILES_PICTURE_LAYER_TILING_SET_H_ | 206 #endif // CC_TILES_PICTURE_LAYER_TILING_SET_H_ |
OLD | NEW |