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_THREAD_PROXY_H_ | 5 #ifndef CC_TREES_THREAD_PROXY_H_ |
6 #define CC_TREES_THREAD_PROXY_H_ | 6 #define CC_TREES_THREAD_PROXY_H_ |
7 | 7 |
| 8 #include <set> |
8 #include <string> | 9 #include <string> |
9 | 10 |
| 11 #include "base/containers/hash_tables.h" |
10 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
11 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
12 #include "base/time/time.h" | 14 #include "base/time/time.h" |
13 #include "cc/animation/animation_events.h" | 15 #include "cc/animation/animation_events.h" |
14 #include "cc/base/completion_event.h" | 16 #include "cc/base/completion_event.h" |
15 #include "cc/base/delayed_unique_notifier.h" | 17 #include "cc/base/delayed_unique_notifier.h" |
16 #include "cc/resources/resource_update_controller.h" | 18 #include "cc/resources/resource_update_controller.h" |
17 #include "cc/scheduler/scheduler.h" | 19 #include "cc/scheduler/scheduler.h" |
18 #include "cc/trees/layer_tree_host_impl.h" | 20 #include "cc/trees/layer_tree_host_impl.h" |
19 #include "cc/trees/proxy.h" | 21 #include "cc/trees/proxy.h" |
20 #include "cc/trees/proxy_timing_history.h" | 22 #include "cc/trees/proxy_timing_history.h" |
21 | 23 |
22 namespace base { | 24 namespace base { |
23 class SingleThreadTaskRunner; | 25 class SingleThreadTaskRunner; |
| 26 typedef hash_map<int, std::set<base::TimeTicks> > TimeTickMap; |
24 } | 27 } |
25 | 28 |
26 namespace cc { | 29 namespace cc { |
27 | 30 |
28 class ContextProvider; | 31 class ContextProvider; |
29 class InputHandlerClient; | 32 class InputHandlerClient; |
30 class LayerTreeHost; | 33 class LayerTreeHost; |
31 class ResourceUpdateQueue; | 34 class ResourceUpdateQueue; |
32 class Scheduler; | 35 class Scheduler; |
33 class ScopedThreadProxy; | 36 class ScopedThreadProxy; |
(...skipping 10 matching lines...) Expand all Loading... |
44 | 47 |
45 virtual ~ThreadProxy(); | 48 virtual ~ThreadProxy(); |
46 | 49 |
47 struct BeginMainFrameAndCommitState { | 50 struct BeginMainFrameAndCommitState { |
48 BeginMainFrameAndCommitState(); | 51 BeginMainFrameAndCommitState(); |
49 ~BeginMainFrameAndCommitState(); | 52 ~BeginMainFrameAndCommitState(); |
50 | 53 |
51 unsigned int begin_frame_id; | 54 unsigned int begin_frame_id; |
52 base::TimeTicks monotonic_frame_begin_time; | 55 base::TimeTicks monotonic_frame_begin_time; |
53 scoped_ptr<ScrollAndScaleSet> scroll_info; | 56 scoped_ptr<ScrollAndScaleSet> scroll_info; |
| 57 scoped_ptr<DrawTimingSet> draw_info; |
| 58 base::TimeTickMap draw_timing; |
54 size_t memory_allocation_limit_bytes; | 59 size_t memory_allocation_limit_bytes; |
55 int memory_allocation_priority_cutoff; | 60 int memory_allocation_priority_cutoff; |
56 bool evicted_ui_resources; | 61 bool evicted_ui_resources; |
57 }; | 62 }; |
58 | 63 |
59 struct MainThreadOnly { | 64 struct MainThreadOnly { |
60 MainThreadOnly(ThreadProxy* proxy, int layer_tree_host_id); | 65 MainThreadOnly(ThreadProxy* proxy, int layer_tree_host_id); |
61 ~MainThreadOnly(); | 66 ~MainThreadOnly(); |
62 | 67 |
63 const int layer_tree_host_id; | 68 const int layer_tree_host_id; |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 | 307 |
303 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; | 308 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; |
304 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; | 309 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; |
305 | 310 |
306 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); | 311 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); |
307 }; | 312 }; |
308 | 313 |
309 } // namespace cc | 314 } // namespace cc |
310 | 315 |
311 #endif // CC_TREES_THREAD_PROXY_H_ | 316 #endif // CC_TREES_THREAD_PROXY_H_ |
OLD | NEW |