OLD | NEW |
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_events.h" | 23 #include "cc/animation/animation_events.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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 bool AnimateLayersRecursive(Layer* current, base::TimeTicks time); | 414 bool AnimateLayersRecursive(Layer* current, base::TimeTicks time); |
415 | 415 |
416 bool IsSingleThreaded() const; | 416 bool IsSingleThreaded() const; |
417 bool IsThreaded() const; | 417 bool IsThreaded() const; |
418 | 418 |
419 struct UIResourceClientData { | 419 struct UIResourceClientData { |
420 UIResourceClient* client; | 420 UIResourceClient* client; |
421 gfx::Size size; | 421 gfx::Size size; |
422 }; | 422 }; |
423 | 423 |
424 typedef base::hash_map<UIResourceId, UIResourceClientData> | 424 typedef std::unordered_map<UIResourceId, UIResourceClientData> |
425 UIResourceClientMap; | 425 UIResourceClientMap; |
426 UIResourceClientMap ui_resource_client_map_; | 426 UIResourceClientMap ui_resource_client_map_; |
427 int next_ui_resource_id_; | 427 int next_ui_resource_id_; |
428 | 428 |
429 typedef std::vector<UIResourceRequest> UIResourceRequestQueue; | 429 typedef std::vector<UIResourceRequest> UIResourceRequestQueue; |
430 UIResourceRequestQueue ui_resource_request_queue_; | 430 UIResourceRequestQueue ui_resource_request_queue_; |
431 | 431 |
432 void CalculateLCDTextMetricsCallback(Layer* layer); | 432 void CalculateLCDTextMetricsCallback(Layer* layer); |
433 | 433 |
434 void NotifySwapPromiseMonitorsOfSetNeedsCommit(); | 434 void NotifySwapPromiseMonitorsOfSetNeedsCommit(); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 | 508 |
509 SharedBitmapManager* shared_bitmap_manager_; | 509 SharedBitmapManager* shared_bitmap_manager_; |
510 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; | 510 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; |
511 TaskGraphRunner* task_graph_runner_; | 511 TaskGraphRunner* task_graph_runner_; |
512 | 512 |
513 std::vector<scoped_ptr<SwapPromise>> swap_promise_list_; | 513 std::vector<scoped_ptr<SwapPromise>> swap_promise_list_; |
514 std::set<SwapPromiseMonitor*> swap_promise_monitor_; | 514 std::set<SwapPromiseMonitor*> swap_promise_monitor_; |
515 | 515 |
516 PropertyTrees property_trees_; | 516 PropertyTrees property_trees_; |
517 | 517 |
518 typedef base::hash_map<int, Layer*> LayerIdMap; | 518 typedef std::unordered_map<int, Layer*> LayerIdMap; |
519 LayerIdMap layer_id_map_; | 519 LayerIdMap layer_id_map_; |
520 | 520 |
521 uint32_t surface_id_namespace_; | 521 uint32_t surface_id_namespace_; |
522 uint32_t next_surface_sequence_; | 522 uint32_t next_surface_sequence_; |
523 | 523 |
524 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 524 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
525 }; | 525 }; |
526 | 526 |
527 } // namespace cc | 527 } // namespace cc |
528 | 528 |
529 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 529 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
OLD | NEW |