Chromium Code Reviews| 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 <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 31 LOWER_THAN_LOW_RES | 31 LOWER_THAN_LOW_RES |
| 32 }; | 32 }; |
| 33 struct TilingRange { | 33 struct TilingRange { |
| 34 TilingRange(size_t start, size_t end) : start(start), end(end) {} | 34 TilingRange(size_t start, size_t end) : start(start), end(end) {} |
| 35 | 35 |
| 36 size_t start; | 36 size_t start; |
| 37 size_t end; | 37 size_t end; |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 static scoped_ptr<PictureLayerTilingSet> Create( | 40 static scoped_ptr<PictureLayerTilingSet> Create( |
| 41 PictureLayerTilingClient* client); | 41 PictureLayerTilingClient* client, |
| 42 size_t max_tiles_For_interest_area, | |
| 43 float skewport_target_time_in_seconds, | |
| 44 int skewport_extrapolation_limit_in_content); | |
| 42 | 45 |
| 43 ~PictureLayerTilingSet(); | 46 ~PictureLayerTilingSet(); |
| 44 | 47 |
| 45 void SetClient(PictureLayerTilingClient* client); | 48 void SetClient(PictureLayerTilingClient* client); |
| 46 const PictureLayerTilingClient* client() const { return client_; } | 49 const PictureLayerTilingClient* client() const { return client_; } |
| 47 | 50 |
| 48 void RemoveTilesInRegion(const Region& region); | 51 void RemoveTilesInRegion(const Region& region); |
| 49 void CleanUpTilings(float min_acceptable_high_res_scale, | 52 void CleanUpTilings(float min_acceptable_high_res_scale, |
| 50 float max_acceptable_high_res_scale, | 53 float max_acceptable_high_res_scale, |
| 51 const std::vector<PictureLayerTiling*>& needed_tilings, | 54 const std::vector<PictureLayerTiling*>& needed_tilings, |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 148 Region missing_region_; | 151 Region missing_region_; |
| 149 Region::Iterator region_iter_; | 152 Region::Iterator region_iter_; |
| 150 }; | 153 }; |
| 151 | 154 |
| 152 void AsValueInto(base::debug::TracedValue* array) const; | 155 void AsValueInto(base::debug::TracedValue* array) const; |
| 153 size_t GPUMemoryUsageInBytes() const; | 156 size_t GPUMemoryUsageInBytes() const; |
| 154 | 157 |
| 155 TilingRange GetTilingRange(TilingRangeType type) const; | 158 TilingRange GetTilingRange(TilingRangeType type) const; |
| 156 | 159 |
| 157 private: | 160 private: |
| 158 explicit PictureLayerTilingSet(PictureLayerTilingClient* client); | 161 explicit PictureLayerTilingSet( |
| 162 PictureLayerTilingClient* client, | |
| 163 size_t max_tiles_for_interest_area, | |
| 164 float skewport_target_time_in_seconds, | |
| 165 int skewport_extrapolation_limit_in_content_pixels); | |
| 159 | 166 |
| 160 // Remove one tiling. | 167 // Remove one tiling. |
| 161 void Remove(PictureLayerTiling* tiling); | 168 void Remove(PictureLayerTiling* tiling); |
| 162 | 169 |
| 170 ScopedPtrVector<PictureLayerTiling> tilings_; | |
| 171 | |
| 172 size_t max_tiles_for_interest_area_; | |
|
danakj
2014/12/10 22:23:25
const?
vmpstr
2014/12/11 00:14:17
Yes! thanks.
| |
| 173 float skewport_target_time_in_seconds_; | |
| 174 int skewport_extrapolation_limit_in_content_pixels_; | |
| 163 PictureLayerTilingClient* client_; | 175 PictureLayerTilingClient* client_; |
| 164 ScopedPtrVector<PictureLayerTiling> tilings_; | |
| 165 | 176 |
| 166 friend class Iterator; | 177 friend class Iterator; |
| 167 DISALLOW_COPY_AND_ASSIGN(PictureLayerTilingSet); | 178 DISALLOW_COPY_AND_ASSIGN(PictureLayerTilingSet); |
| 168 }; | 179 }; |
| 169 | 180 |
| 170 } // namespace cc | 181 } // namespace cc |
| 171 | 182 |
| 172 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_ | 183 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_ |
| OLD | NEW |