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

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

Issue 1126793002: cc: Make tiling interest rect calc based on viewport. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove switch entry from chromeos cmdline. Created 5 years, 7 months 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 22 matching lines...) Expand all
33 struct TilingRange { 33 struct TilingRange {
34 TilingRange(int start, int end) : start(start), end(end) {} 34 TilingRange(int start, int end) : start(start), end(end) {}
35 35
36 int start; 36 int start;
37 int end; 37 int end;
38 }; 38 };
39 39
40 static scoped_ptr<PictureLayerTilingSet> Create( 40 static scoped_ptr<PictureLayerTilingSet> Create(
41 WhichTree tree, 41 WhichTree tree,
42 PictureLayerTilingClient* client, 42 PictureLayerTilingClient* client,
43 size_t max_tiles_for_interest_area, 43 float tiling_interest_area_viewport_multiplier,
44 float skewport_target_time_in_seconds, 44 float skewport_target_time_in_seconds,
45 int skewport_extrapolation_limit_in_content); 45 int skewport_extrapolation_limit_in_content);
46 46
47 ~PictureLayerTilingSet(); 47 ~PictureLayerTilingSet();
48 48
49 const PictureLayerTilingClient* client() const { return client_; } 49 const PictureLayerTilingClient* client() const { return client_; }
50 50
51 void CleanUpTilings(float min_acceptable_high_res_scale, 51 void CleanUpTilings(float min_acceptable_high_res_scale,
52 float max_acceptable_high_res_scale, 52 float max_acceptable_high_res_scale,
53 const std::vector<PictureLayerTiling*>& needed_tilings, 53 const std::vector<PictureLayerTiling*>& needed_tilings,
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 169
170 void AsValueInto(base::trace_event::TracedValue* array) const; 170 void AsValueInto(base::trace_event::TracedValue* array) const;
171 size_t GPUMemoryUsageInBytes() const; 171 size_t GPUMemoryUsageInBytes() const;
172 172
173 TilingRange GetTilingRange(TilingRangeType type) const; 173 TilingRange GetTilingRange(TilingRangeType type) const;
174 174
175 private: 175 private:
176 explicit PictureLayerTilingSet( 176 explicit PictureLayerTilingSet(
177 WhichTree tree, 177 WhichTree tree,
178 PictureLayerTilingClient* client, 178 PictureLayerTilingClient* client,
179 size_t max_tiles_for_interest_area, 179 float tiling_interest_area_viewport_multiplier,
180 float skewport_target_time_in_seconds, 180 float skewport_target_time_in_seconds,
181 int skewport_extrapolation_limit_in_content_pixels); 181 int skewport_extrapolation_limit_in_content_pixels);
182 182
183 void CopyTilingsAndPropertiesFromPendingTwin( 183 void CopyTilingsAndPropertiesFromPendingTwin(
184 const PictureLayerTilingSet* pending_twin_set, 184 const PictureLayerTilingSet* pending_twin_set,
185 const scoped_refptr<RasterSource>& raster_source, 185 const 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 ScopedPtrVector<PictureLayerTiling> tilings_; 192 ScopedPtrVector<PictureLayerTiling> tilings_;
193 193
194 const size_t max_tiles_for_interest_area_; 194 const float tiling_interest_area_viewport_multiplier_;
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_RESOURCES_PICTURE_LAYER_TILING_SET_H_ 206 #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