| 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/delayed_unique_notifier.h" | 15 #include "cc/base/delayed_unique_notifier.h" |
| 16 #include "cc/scheduler/commit_earlyout_reason.h" | 16 #include "cc/scheduler/commit_earlyout_reason.h" |
| 17 #include "cc/scheduler/scheduler.h" | 17 #include "cc/scheduler/scheduler.h" |
| 18 #include "cc/trees/layer_tree_host_impl.h" | 18 #include "cc/trees/layer_tree_host_impl.h" |
| 19 #include "cc/trees/proxy.h" | 19 #include "cc/trees/proxy.h" |
| 20 #include "cc/trees/proxy_timing_history.h" | |
| 21 | 20 |
| 22 namespace base { | 21 namespace base { |
| 23 class SingleThreadTaskRunner; | 22 class SingleThreadTaskRunner; |
| 24 } | 23 } |
| 25 | 24 |
| 26 namespace cc { | 25 namespace cc { |
| 27 | 26 |
| 28 class BeginFrameSource; | 27 class BeginFrameSource; |
| 29 class ContextProvider; | 28 class ContextProvider; |
| 30 class InputHandlerClient; | 29 class InputHandlerClient; |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 bool input_throttled_until_commit; | 120 bool input_throttled_until_commit; |
| 122 | 121 |
| 123 base::TimeTicks animation_time; | 122 base::TimeTicks animation_time; |
| 124 | 123 |
| 125 // Whether a commit has been completed since the last time animations were | 124 // Whether a commit has been completed since the last time animations were |
| 126 // ticked. If this happens, we need to animate again. | 125 // ticked. If this happens, we need to animate again. |
| 127 bool did_commit_after_animating; | 126 bool did_commit_after_animating; |
| 128 | 127 |
| 129 DelayedUniqueNotifier smoothness_priority_expiration_notifier; | 128 DelayedUniqueNotifier smoothness_priority_expiration_notifier; |
| 130 | 129 |
| 131 ProxyTimingHistory timing_history; | 130 scoped_ptr<BeginFrameSource> external_begin_frame_source; |
| 132 | 131 |
| 133 scoped_ptr<BeginFrameSource> external_begin_frame_source; | 132 RenderingStatsInstrumentation* rendering_stats_instrumentation; |
| 134 | 133 |
| 135 // Values used to keep track of frame durations. Used only in frame timing. | 134 // Values used to keep track of frame durations. Used only in frame timing. |
| 136 BeginFrameArgs last_begin_main_frame_args; | 135 BeginFrameArgs last_begin_main_frame_args; |
| 137 BeginFrameArgs last_processed_begin_main_frame_args; | 136 BeginFrameArgs last_processed_begin_main_frame_args; |
| 138 | 137 |
| 139 scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl; | 138 scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl; |
| 140 base::WeakPtrFactory<ThreadProxy> weak_factory; | 139 base::WeakPtrFactory<ThreadProxy> weak_factory; |
| 141 }; | 140 }; |
| 142 | 141 |
| 143 const MainThreadOnly& main() const; | 142 const MainThreadOnly& main() const; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 void DidFinishImplFrame() override; | 213 void DidFinishImplFrame() override; |
| 215 void ScheduledActionSendBeginMainFrame() override; | 214 void ScheduledActionSendBeginMainFrame() override; |
| 216 DrawResult ScheduledActionDrawAndSwapIfPossible() override; | 215 DrawResult ScheduledActionDrawAndSwapIfPossible() override; |
| 217 DrawResult ScheduledActionDrawAndSwapForced() override; | 216 DrawResult ScheduledActionDrawAndSwapForced() override; |
| 218 void ScheduledActionAnimate() override; | 217 void ScheduledActionAnimate() override; |
| 219 void ScheduledActionCommit() override; | 218 void ScheduledActionCommit() override; |
| 220 void ScheduledActionActivateSyncTree() override; | 219 void ScheduledActionActivateSyncTree() override; |
| 221 void ScheduledActionBeginOutputSurfaceCreation() override; | 220 void ScheduledActionBeginOutputSurfaceCreation() override; |
| 222 void ScheduledActionPrepareTiles() override; | 221 void ScheduledActionPrepareTiles() override; |
| 223 void ScheduledActionInvalidateOutputSurface() override; | 222 void ScheduledActionInvalidateOutputSurface() override; |
| 224 base::TimeDelta DrawDurationEstimate() override; | |
| 225 base::TimeDelta BeginMainFrameToCommitDurationEstimate() override; | |
| 226 base::TimeDelta CommitToActivateDurationEstimate() override; | |
| 227 void SendBeginFramesToChildren(const BeginFrameArgs& args) override; | 223 void SendBeginFramesToChildren(const BeginFrameArgs& args) override; |
| 228 void SendBeginMainFrameNotExpectedSoon() override; | 224 void SendBeginMainFrameNotExpectedSoon() override; |
| 229 | 225 |
| 230 protected: | 226 protected: |
| 231 ThreadProxy( | 227 ThreadProxy( |
| 232 LayerTreeHost* layer_tree_host, | 228 LayerTreeHost* layer_tree_host, |
| 233 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, | 229 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, |
| 234 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner, | 230 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner, |
| 235 scoped_ptr<BeginFrameSource> external_begin_frame_source); | 231 scoped_ptr<BeginFrameSource> external_begin_frame_source); |
| 236 | 232 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 | 295 |
| 300 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; | 296 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; |
| 301 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; | 297 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; |
| 302 | 298 |
| 303 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); | 299 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); |
| 304 }; | 300 }; |
| 305 | 301 |
| 306 } // namespace cc | 302 } // namespace cc |
| 307 | 303 |
| 308 #endif // CC_TREES_THREAD_PROXY_H_ | 304 #endif // CC_TREES_THREAD_PROXY_H_ |
| OLD | NEW |