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

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

Issue 1168903003: cc: Fix size_t to int truncations in tiles/ and trees/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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/tiles/picture_layer_tiling.cc ('k') | cc/tiles/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_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 <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 13 matching lines...) Expand all
24 class CC_EXPORT PictureLayerTilingSet { 24 class CC_EXPORT PictureLayerTilingSet {
25 public: 25 public:
26 enum TilingRangeType { 26 enum TilingRangeType {
27 HIGHER_THAN_HIGH_RES, 27 HIGHER_THAN_HIGH_RES,
28 HIGH_RES, 28 HIGH_RES,
29 BETWEEN_HIGH_AND_LOW_RES, 29 BETWEEN_HIGH_AND_LOW_RES,
30 LOW_RES, 30 LOW_RES,
31 LOWER_THAN_LOW_RES 31 LOWER_THAN_LOW_RES
32 }; 32 };
33 struct TilingRange { 33 struct TilingRange {
34 TilingRange(int start, int end) : start(start), end(end) {} 34 TilingRange(size_t start, size_t end) : start(start), end(end) {}
35 35
36 int start; 36 size_t start;
37 int end; 37 size_t 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 float tiling_interest_area_viewport_multiplier, 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();
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 Tile* operator->() const; 145 Tile* operator->() const;
146 Tile* operator*() const; 146 Tile* operator*() const;
147 147
148 CoverageIterator& operator++(); 148 CoverageIterator& operator++();
149 operator bool() const; 149 operator bool() const;
150 150
151 TileResolution resolution() const; 151 TileResolution resolution() const;
152 PictureLayerTiling* CurrentTiling() const; 152 PictureLayerTiling* CurrentTiling() const;
153 153
154 private: 154 private:
155 int NextTiling() const; 155 size_t NextTiling() const;
156 156
157 const PictureLayerTilingSet* set_; 157 const PictureLayerTilingSet* set_;
158 float contents_scale_; 158 float contents_scale_;
159 float ideal_contents_scale_; 159 float ideal_contents_scale_;
160 PictureLayerTiling::CoverageIterator tiling_iter_; 160 PictureLayerTiling::CoverageIterator tiling_iter_;
161 int current_tiling_; 161 size_t current_tiling_;
162 int ideal_tiling_; 162 size_t ideal_tiling_;
163 163
164 Region current_region_; 164 Region current_region_;
165 Region missing_region_; 165 Region missing_region_;
166 Region::Iterator region_iter_; 166 Region::Iterator region_iter_;
167 }; 167 };
168 168
169 void AsValueInto(base::trace_event::TracedValue* array) const; 169 void AsValueInto(base::trace_event::TracedValue* array) const;
170 size_t GPUMemoryUsageInBytes() const; 170 size_t GPUMemoryUsageInBytes() const;
171 171
172 TilingRange GetTilingRange(TilingRangeType type) const; 172 TilingRange GetTilingRange(TilingRangeType type) const;
(...skipping 23 matching lines...) Expand all
196 WhichTree tree_; 196 WhichTree tree_;
197 PictureLayerTilingClient* client_; 197 PictureLayerTilingClient* client_;
198 198
199 friend class Iterator; 199 friend class Iterator;
200 DISALLOW_COPY_AND_ASSIGN(PictureLayerTilingSet); 200 DISALLOW_COPY_AND_ASSIGN(PictureLayerTilingSet);
201 }; 201 };
202 202
203 } // namespace cc 203 } // namespace cc
204 204
205 #endif // CC_TILES_PICTURE_LAYER_TILING_SET_H_ 205 #endif // CC_TILES_PICTURE_LAYER_TILING_SET_H_
OLDNEW
« no previous file with comments | « cc/tiles/picture_layer_tiling.cc ('k') | cc/tiles/picture_layer_tiling_set.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698