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

Side by Side Diff: cc/trees/layer_tree_host.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, 11 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_manager.h ('k') | cc/trees/layer_tree_host.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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_TREES_LAYER_TREE_HOST_H_ 5 #ifndef CC_TREES_LAYER_TREE_HOST_H_
6 #define CC_TREES_LAYER_TREE_HOST_H_ 6 #define CC_TREES_LAYER_TREE_HOST_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <limits> 11 #include <limits>
12 #include <set> 12 #include <set>
13 #include <string> 13 #include <string>
14 #include <unordered_map>
14 #include <vector> 15 #include <vector>
15 16
16 #include "base/cancelable_callback.h" 17 #include "base/cancelable_callback.h"
17 #include "base/containers/hash_tables.h"
18 #include "base/macros.h" 18 #include "base/macros.h"
19 #include "base/memory/ref_counted.h" 19 #include "base/memory/ref_counted.h"
20 #include "base/memory/scoped_ptr.h" 20 #include "base/memory/scoped_ptr.h"
21 #include "base/memory/weak_ptr.h" 21 #include "base/memory/weak_ptr.h"
22 #include "base/time/time.h" 22 #include "base/time/time.h"
23 #include "cc/animation/animation.h" 23 #include "cc/animation/animation.h"
24 #include "cc/base/cc_export.h" 24 #include "cc/base/cc_export.h"
25 #include "cc/debug/frame_timing_tracker.h" 25 #include "cc/debug/frame_timing_tracker.h"
26 #include "cc/debug/micro_benchmark.h" 26 #include "cc/debug/micro_benchmark.h"
27 #include "cc/debug/micro_benchmark_controller.h" 27 #include "cc/debug/micro_benchmark_controller.h"
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 bool AnimateLayersRecursive(Layer* current, base::TimeTicks time); 432 bool AnimateLayersRecursive(Layer* current, base::TimeTicks time);
433 433
434 bool IsSingleThreaded() const; 434 bool IsSingleThreaded() const;
435 bool IsThreaded() const; 435 bool IsThreaded() const;
436 436
437 struct UIResourceClientData { 437 struct UIResourceClientData {
438 UIResourceClient* client; 438 UIResourceClient* client;
439 gfx::Size size; 439 gfx::Size size;
440 }; 440 };
441 441
442 typedef base::hash_map<UIResourceId, UIResourceClientData> 442 using UIResourceClientMap =
443 UIResourceClientMap; 443 std::unordered_map<UIResourceId, UIResourceClientData>;
444 UIResourceClientMap ui_resource_client_map_; 444 UIResourceClientMap ui_resource_client_map_;
445 int next_ui_resource_id_; 445 int next_ui_resource_id_;
446 446
447 typedef std::vector<UIResourceRequest> UIResourceRequestQueue; 447 using UIResourceRequestQueue = std::vector<UIResourceRequest>;
448 UIResourceRequestQueue ui_resource_request_queue_; 448 UIResourceRequestQueue ui_resource_request_queue_;
449 449
450 void CalculateLCDTextMetricsCallback(Layer* layer); 450 void CalculateLCDTextMetricsCallback(Layer* layer);
451 451
452 void NotifySwapPromiseMonitorsOfSetNeedsCommit(); 452 void NotifySwapPromiseMonitorsOfSetNeedsCommit();
453 453
454 void SetPropertyTreesNeedRebuild(); 454 void SetPropertyTreesNeedRebuild();
455 455
456 const CompositorMode compositor_mode_; 456 const CompositorMode compositor_mode_;
457 457
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 526
527 SharedBitmapManager* shared_bitmap_manager_; 527 SharedBitmapManager* shared_bitmap_manager_;
528 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; 528 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_;
529 TaskGraphRunner* task_graph_runner_; 529 TaskGraphRunner* task_graph_runner_;
530 530
531 std::vector<scoped_ptr<SwapPromise>> swap_promise_list_; 531 std::vector<scoped_ptr<SwapPromise>> swap_promise_list_;
532 std::set<SwapPromiseMonitor*> swap_promise_monitor_; 532 std::set<SwapPromiseMonitor*> swap_promise_monitor_;
533 533
534 PropertyTrees property_trees_; 534 PropertyTrees property_trees_;
535 535
536 typedef base::hash_map<int, Layer*> LayerIdMap; 536 using LayerIdMap = std::unordered_map<int, Layer*>;
537 LayerIdMap layer_id_map_; 537 LayerIdMap layer_id_map_;
538 538
539 uint32_t surface_id_namespace_; 539 uint32_t surface_id_namespace_;
540 uint32_t next_surface_sequence_; 540 uint32_t next_surface_sequence_;
541 541
542 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); 542 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost);
543 }; 543 };
544 544
545 } // namespace cc 545 } // namespace cc
546 546
547 #endif // CC_TREES_LAYER_TREE_HOST_H_ 547 #endif // CC_TREES_LAYER_TREE_HOST_H_
OLDNEW
« no previous file with comments | « cc/tiles/tile_manager.h ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698