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

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: 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
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 21 matching lines...) Expand all
32 }; 32 };
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 PictureLayerTilingClient* client, 41 PictureLayerTilingClient* client,
42 size_t max_tiles_for_interest_area, 42 size_t max_interest_area,
43 float skewport_target_time_in_seconds, 43 float skewport_target_time_in_seconds,
44 int skewport_extrapolation_limit_in_content); 44 int skewport_extrapolation_limit_in_content);
45 45
46 ~PictureLayerTilingSet(); 46 ~PictureLayerTilingSet();
47 47
48 const PictureLayerTilingClient* client() const { return client_; } 48 const PictureLayerTilingClient* client() const { return client_; }
49 49
50 void CleanUpTilings(float min_acceptable_high_res_scale, 50 void CleanUpTilings(float min_acceptable_high_res_scale,
51 float max_acceptable_high_res_scale, 51 float max_acceptable_high_res_scale,
52 const std::vector<PictureLayerTiling*>& needed_tilings, 52 const std::vector<PictureLayerTiling*>& needed_tilings,
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 }; 166 };
167 167
168 void AsValueInto(base::trace_event::TracedValue* array) const; 168 void AsValueInto(base::trace_event::TracedValue* array) const;
169 size_t GPUMemoryUsageInBytes() const; 169 size_t GPUMemoryUsageInBytes() const;
170 170
171 TilingRange GetTilingRange(TilingRangeType type) const; 171 TilingRange GetTilingRange(TilingRangeType type) const;
172 172
173 private: 173 private:
174 explicit PictureLayerTilingSet( 174 explicit PictureLayerTilingSet(
175 PictureLayerTilingClient* client, 175 PictureLayerTilingClient* client,
176 size_t max_tiles_for_interest_area, 176 size_t max_interest_area,
177 float skewport_target_time_in_seconds, 177 float skewport_target_time_in_seconds,
178 int skewport_extrapolation_limit_in_content_pixels); 178 int skewport_extrapolation_limit_in_content_pixels);
179 179
180 void CopyTilingsAndPropertiesFromPendingTwin( 180 void CopyTilingsAndPropertiesFromPendingTwin(
181 const PictureLayerTilingSet* pending_twin_set, 181 const PictureLayerTilingSet* pending_twin_set,
182 const scoped_refptr<RasterSource>& raster_source, 182 const scoped_refptr<RasterSource>& raster_source,
183 const Region& layer_invalidation); 183 const Region& layer_invalidation);
184 184
185 // Remove one tiling. 185 // Remove one tiling.
186 void Remove(PictureLayerTiling* tiling); 186 void Remove(PictureLayerTiling* tiling);
187 void VerifyTilings(const PictureLayerTilingSet* pending_twin_set) const; 187 void VerifyTilings(const PictureLayerTilingSet* pending_twin_set) const;
188 188
189 ScopedPtrVector<PictureLayerTiling> tilings_; 189 ScopedPtrVector<PictureLayerTiling> tilings_;
190 190
191 const size_t max_tiles_for_interest_area_; 191 const size_t max_interest_area_;
192 const float skewport_target_time_in_seconds_; 192 const float skewport_target_time_in_seconds_;
193 const int skewport_extrapolation_limit_in_content_pixels_; 193 const int skewport_extrapolation_limit_in_content_pixels_;
194 PictureLayerTilingClient* client_; 194 PictureLayerTilingClient* client_;
195 195
196 friend class Iterator; 196 friend class Iterator;
197 DISALLOW_COPY_AND_ASSIGN(PictureLayerTilingSet); 197 DISALLOW_COPY_AND_ASSIGN(PictureLayerTilingSet);
198 }; 198 };
199 199
200 } // namespace cc 200 } // namespace cc
201 201
202 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_ 202 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698