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

Side by Side Diff: cc/tiles/tile_manager.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/tile.cc ('k') | cc/tiles/tile_manager.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_TILE_MANAGER_H_ 5 #ifndef CC_TILES_TILE_MANAGER_H_
6 #define CC_TILES_TILE_MANAGER_H_ 6 #define CC_TILES_TILE_MANAGER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <queue> 9 #include <queue>
10 #include <set> 10 #include <set>
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 206
207 void AssignGpuMemoryToTiles( 207 void AssignGpuMemoryToTiles(
208 RasterTilePriorityQueue* raster_priority_queue, 208 RasterTilePriorityQueue* raster_priority_queue,
209 size_t scheduled_raser_task_limit, 209 size_t scheduled_raser_task_limit,
210 PrioritizedTileVector* tiles_that_need_to_be_rasterized); 210 PrioritizedTileVector* tiles_that_need_to_be_rasterized);
211 211
212 private: 212 private:
213 class MemoryUsage { 213 class MemoryUsage {
214 public: 214 public:
215 MemoryUsage(); 215 MemoryUsage();
216 MemoryUsage(int64 memory_bytes, int resource_count); 216 MemoryUsage(size_t memory_bytes, size_t resource_count);
217 217
218 static MemoryUsage FromConfig(const gfx::Size& size, ResourceFormat format); 218 static MemoryUsage FromConfig(const gfx::Size& size, ResourceFormat format);
219 static MemoryUsage FromTile(const Tile* tile); 219 static MemoryUsage FromTile(const Tile* tile);
220 220
221 MemoryUsage& operator+=(const MemoryUsage& other); 221 MemoryUsage& operator+=(const MemoryUsage& other);
222 MemoryUsage& operator-=(const MemoryUsage& other); 222 MemoryUsage& operator-=(const MemoryUsage& other);
223 MemoryUsage operator-(const MemoryUsage& other); 223 MemoryUsage operator-(const MemoryUsage& other);
224 224
225 bool Exceeds(const MemoryUsage& limit) const; 225 bool Exceeds(const MemoryUsage& limit) const;
226 int64 memory_bytes() const { return memory_bytes_; } 226 int64 memory_bytes() const { return memory_bytes_; }
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 306
307 bool did_notify_ready_to_activate_; 307 bool did_notify_ready_to_activate_;
308 bool did_notify_ready_to_draw_; 308 bool did_notify_ready_to_draw_;
309 309
310 DISALLOW_COPY_AND_ASSIGN(TileManager); 310 DISALLOW_COPY_AND_ASSIGN(TileManager);
311 }; 311 };
312 312
313 } // namespace cc 313 } // namespace cc
314 314
315 #endif // CC_TILES_TILE_MANAGER_H_ 315 #endif // CC_TILES_TILE_MANAGER_H_
OLDNEW
« no previous file with comments | « cc/tiles/tile.cc ('k') | cc/tiles/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698