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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
13 #include "cc/animation/animation_events.h" | 13 #include "cc/animation/animation_events.h" |
14 #include "cc/base/completion_event.h" | 14 #include "cc/base/completion_event.h" |
15 #include "cc/base/rolling_time_delta_history.h" | |
16 #include "cc/resources/resource_update_controller.h" | 15 #include "cc/resources/resource_update_controller.h" |
17 #include "cc/scheduler/scheduler.h" | 16 #include "cc/scheduler/scheduler.h" |
18 #include "cc/trees/layer_tree_host_impl.h" | 17 #include "cc/trees/layer_tree_host_impl.h" |
19 #include "cc/trees/proxy.h" | 18 #include "cc/trees/proxy.h" |
| 19 #include "cc/trees/proxy_timing_history.h" |
20 | 20 |
21 namespace base { | 21 namespace base { |
22 class SingleThreadTaskRunner; | 22 class SingleThreadTaskRunner; |
23 } | 23 } |
24 | 24 |
25 namespace cc { | 25 namespace cc { |
26 | 26 |
27 class ContextProvider; | 27 class ContextProvider; |
28 class InputHandlerClient; | 28 class InputHandlerClient; |
29 class LayerTreeHost; | 29 class LayerTreeHost; |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 | 290 |
291 bool input_throttled_until_commit; | 291 bool input_throttled_until_commit; |
292 | 292 |
293 // Set when we freeze animations to avoid checkerboarding. | 293 // Set when we freeze animations to avoid checkerboarding. |
294 bool animations_frozen_until_next_draw; | 294 bool animations_frozen_until_next_draw; |
295 base::TimeTicks animation_freeze_time; | 295 base::TimeTicks animation_freeze_time; |
296 | 296 |
297 base::TimeTicks smoothness_takes_priority_expiration_time; | 297 base::TimeTicks smoothness_takes_priority_expiration_time; |
298 bool renew_tree_priority_pending; | 298 bool renew_tree_priority_pending; |
299 | 299 |
300 RollingTimeDeltaHistory draw_duration_history; | 300 ProxyTimingHistory timing_history; |
301 RollingTimeDeltaHistory begin_main_frame_to_commit_duration_history; | |
302 RollingTimeDeltaHistory commit_to_activate_duration_history; | |
303 | |
304 // Used for computing samples added to | |
305 // begin_main_frame_to_commit_duration_history_ and | |
306 // activation_duration_history_. | |
307 base::TimeTicks begin_main_frame_sent_time; | |
308 base::TimeTicks commit_complete_time; | |
309 | 301 |
310 scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl; | 302 scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl; |
311 base::WeakPtrFactory<ThreadProxy> weak_factory; | 303 base::WeakPtrFactory<ThreadProxy> weak_factory; |
312 }; | 304 }; |
313 // Use accessors instead of this variable directly. | 305 // Use accessors instead of this variable directly. |
314 CompositorThreadOnly compositor_thread_vars_unsafe_; | 306 CompositorThreadOnly compositor_thread_vars_unsafe_; |
315 CompositorThreadOnly& impl(); | 307 CompositorThreadOnly& impl(); |
316 const CompositorThreadOnly& impl() const; | 308 const CompositorThreadOnly& impl() const; |
317 | 309 |
318 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; | 310 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; |
319 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; | 311 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; |
320 | 312 |
321 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); | 313 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); |
322 }; | 314 }; |
323 | 315 |
324 } // namespace cc | 316 } // namespace cc |
325 | 317 |
326 #endif // CC_TREES_THREAD_PROXY_H_ | 318 #endif // CC_TREES_THREAD_PROXY_H_ |
OLD | NEW |