Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(304)

Side by Side Diff: cc/resources/picture_layer_tiling_set.h

Issue 775483002: cc: Remove max tiles and skewport constants from tiling client. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/resources/picture_layer_tiling_perftest.cc ('k') | cc/resources/picture_layer_tiling_set.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 const PictureLayerTilingClient* client() const { return client_; } 48 const PictureLayerTilingClient* client() const { return client_; }
46 49
47 void CleanUpTilings(float min_acceptable_high_res_scale, 50 void CleanUpTilings(float min_acceptable_high_res_scale,
48 float max_acceptable_high_res_scale, 51 float max_acceptable_high_res_scale,
49 const std::vector<PictureLayerTiling*>& needed_tilings, 52 const std::vector<PictureLayerTiling*>& needed_tilings,
50 bool should_have_low_res, 53 bool should_have_low_res,
51 PictureLayerTilingSet* twin_set, 54 PictureLayerTilingSet* twin_set,
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 Region missing_region_; 162 Region missing_region_;
160 Region::Iterator region_iter_; 163 Region::Iterator region_iter_;
161 }; 164 };
162 165
163 void AsValueInto(base::debug::TracedValue* array) const; 166 void AsValueInto(base::debug::TracedValue* array) const;
164 size_t GPUMemoryUsageInBytes() const; 167 size_t GPUMemoryUsageInBytes() const;
165 168
166 TilingRange GetTilingRange(TilingRangeType type) const; 169 TilingRange GetTilingRange(TilingRangeType type) const;
167 170
168 private: 171 private:
169 explicit PictureLayerTilingSet(PictureLayerTilingClient* client); 172 explicit PictureLayerTilingSet(
173 PictureLayerTilingClient* client,
174 size_t max_tiles_for_interest_area,
175 float skewport_target_time_in_seconds,
176 int skewport_extrapolation_limit_in_content_pixels);
170 177
171 // Remove one tiling. 178 // Remove one tiling.
172 void Remove(PictureLayerTiling* tiling); 179 void Remove(PictureLayerTiling* tiling);
173 180
181 ScopedPtrVector<PictureLayerTiling> tilings_;
182
183 const size_t max_tiles_for_interest_area_;
184 const float skewport_target_time_in_seconds_;
185 const int skewport_extrapolation_limit_in_content_pixels_;
174 PictureLayerTilingClient* client_; 186 PictureLayerTilingClient* client_;
175 ScopedPtrVector<PictureLayerTiling> tilings_;
176 187
177 friend class Iterator; 188 friend class Iterator;
178 DISALLOW_COPY_AND_ASSIGN(PictureLayerTilingSet); 189 DISALLOW_COPY_AND_ASSIGN(PictureLayerTilingSet);
179 }; 190 };
180 191
181 } // namespace cc 192 } // namespace cc
182 193
183 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_ 194 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_
OLDNEW
« no previous file with comments | « cc/resources/picture_layer_tiling_perftest.cc ('k') | cc/resources/picture_layer_tiling_set.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698