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

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

Issue 1587283002: Switch cc to std::unordered_*. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@unordered-map
Patch Set: Fix MSVC build issue Created 4 years, 10 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/trees/layer_tree_host.h » ('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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <set> 11 #include <set>
12 #include <unordered_map>
12 #include <utility> 13 #include <utility>
13 #include <vector> 14 #include <vector>
14 15
15 #include "base/containers/hash_tables.h"
16 #include "base/macros.h" 16 #include "base/macros.h"
17 #include "base/memory/scoped_ptr.h" 17 #include "base/memory/scoped_ptr.h"
18 #include "base/values.h" 18 #include "base/values.h"
19 #include "cc/base/unique_notifier.h" 19 #include "cc/base/unique_notifier.h"
20 #include "cc/playback/display_list_raster_source.h" 20 #include "cc/playback/display_list_raster_source.h"
21 #include "cc/raster/tile_task_runner.h" 21 #include "cc/raster/tile_task_runner.h"
22 #include "cc/resources/memory_history.h" 22 #include "cc/resources/memory_history.h"
23 #include "cc/resources/resource_pool.h" 23 #include "cc/resources/resource_pool.h"
24 #include "cc/tiles/eviction_tile_priority_queue.h" 24 #include "cc/tiles/eviction_tile_priority_queue.h"
25 #include "cc/tiles/image_decode_controller.h" 25 #include "cc/tiles/image_decode_controller.h"
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 286
287 TileManagerClient* client_; 287 TileManagerClient* client_;
288 scoped_refptr<base::SequencedTaskRunner> task_runner_; 288 scoped_refptr<base::SequencedTaskRunner> task_runner_;
289 ResourcePool* resource_pool_; 289 ResourcePool* resource_pool_;
290 TileTaskRunner* tile_task_runner_; 290 TileTaskRunner* tile_task_runner_;
291 GlobalStateThatImpactsTilePriority global_state_; 291 GlobalStateThatImpactsTilePriority global_state_;
292 size_t scheduled_raster_task_limit_; 292 size_t scheduled_raster_task_limit_;
293 const bool use_partial_raster_; 293 const bool use_partial_raster_;
294 bool use_gpu_rasterization_; 294 bool use_gpu_rasterization_;
295 295
296 typedef base::hash_map<Tile::Id, Tile*> TileMap; 296 using TileMap = std::unordered_map<Tile::Id, Tile*>;
297 TileMap tiles_; 297 TileMap tiles_;
298 298
299 bool all_tiles_that_need_to_be_rasterized_are_scheduled_; 299 bool all_tiles_that_need_to_be_rasterized_are_scheduled_;
300 MemoryHistory::Entry memory_stats_from_last_assign_; 300 MemoryHistory::Entry memory_stats_from_last_assign_;
301 301
302 bool did_check_for_completed_tasks_since_last_schedule_tasks_; 302 bool did_check_for_completed_tasks_since_last_schedule_tasks_;
303 bool did_oom_on_last_assign_; 303 bool did_oom_on_last_assign_;
304 304
305 ImageDecodeController image_decode_controller_; 305 ImageDecodeController image_decode_controller_;
306 306
(...skipping 23 matching lines...) Expand all
330 bool did_notify_all_tile_tasks_completed; 330 bool did_notify_all_tile_tasks_completed;
331 } signals_; 331 } signals_;
332 332
333 UniqueNotifier signals_check_notifier_; 333 UniqueNotifier signals_check_notifier_;
334 334
335 bool has_scheduled_tile_tasks_; 335 bool has_scheduled_tile_tasks_;
336 336
337 uint64_t prepare_tiles_count_; 337 uint64_t prepare_tiles_count_;
338 uint64_t next_tile_id_; 338 uint64_t next_tile_id_;
339 339
340 base::hash_map<Tile::Id, std::vector<DrawImage>> scheduled_draw_images_; 340 std::unordered_map<Tile::Id, std::vector<DrawImage>> scheduled_draw_images_;
341 341
342 base::WeakPtrFactory<TileManager> task_set_finished_weak_ptr_factory_; 342 base::WeakPtrFactory<TileManager> task_set_finished_weak_ptr_factory_;
343 343
344 DISALLOW_COPY_AND_ASSIGN(TileManager); 344 DISALLOW_COPY_AND_ASSIGN(TileManager);
345 }; 345 };
346 346
347 } // namespace cc 347 } // namespace cc
348 348
349 #endif // CC_TILES_TILE_MANAGER_H_ 349 #endif // CC_TILES_TILE_MANAGER_H_
OLDNEW
« no previous file with comments | « cc/tiles/picture_layer_tiling.cc ('k') | cc/trees/layer_tree_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698