OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |