Chromium Code Reviews| 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" |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 136 // Whether a commit has been completed since the last time animations were | 136 // Whether a commit has been completed since the last time animations were |
| 137 // ticked. If this happens, we need to animate again. | 137 // ticked. If this happens, we need to animate again. |
| 138 bool did_commit_after_animating; | 138 bool did_commit_after_animating; |
| 139 | 139 |
| 140 DelayedUniqueNotifier smoothness_priority_expiration_notifier; | 140 DelayedUniqueNotifier smoothness_priority_expiration_notifier; |
| 141 | 141 |
| 142 ProxyTimingHistory timing_history; | 142 ProxyTimingHistory timing_history; |
| 143 | 143 |
| 144 scoped_ptr<BeginFrameSource> external_begin_frame_source; | 144 scoped_ptr<BeginFrameSource> external_begin_frame_source; |
| 145 | 145 |
| 146 BeginFrameArgs last_begin_main_frame_args; | |
| 147 BeginFrameArgs last_begin_impl_frame_args; | |
|
mithro-old
2015/03/23 00:15:08
We now have "animation_time", "last_begin_main_fra
vmpstr
2015/03/23 20:26:43
Added a comment. I look forward to your patch land
| |
| 148 | |
| 146 scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl; | 149 scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl; |
| 147 base::WeakPtrFactory<ThreadProxy> weak_factory; | 150 base::WeakPtrFactory<ThreadProxy> weak_factory; |
| 148 }; | 151 }; |
| 149 | 152 |
| 150 const MainThreadOnly& main() const; | 153 const MainThreadOnly& main() const; |
| 151 const MainThreadOrBlockedMainThread& blocked_main() const; | 154 const MainThreadOrBlockedMainThread& blocked_main() const; |
| 152 const CompositorThreadOnly& impl() const; | 155 const CompositorThreadOnly& impl() const; |
| 153 | 156 |
| 154 // Proxy implementation | 157 // Proxy implementation |
| 155 void FinishAllRendering() override; | 158 void FinishAllRendering() override; |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 277 void LayerTreeHostClosedOnImplThread(CompletionEvent* completion); | 280 void LayerTreeHostClosedOnImplThread(CompletionEvent* completion); |
| 278 DrawResult DrawSwapInternal(bool forced_draw); | 281 DrawResult DrawSwapInternal(bool forced_draw); |
| 279 void ForceSerializeOnSwapBuffersOnImplThread(CompletionEvent* completion); | 282 void ForceSerializeOnSwapBuffersOnImplThread(CompletionEvent* completion); |
| 280 void MainFrameWillHappenOnImplThreadForTesting(CompletionEvent* completion, | 283 void MainFrameWillHappenOnImplThreadForTesting(CompletionEvent* completion, |
| 281 bool* main_frame_will_happen); | 284 bool* main_frame_will_happen); |
| 282 void SetSwapUsedIncompleteTileOnImplThread(bool used_incomplete_tile); | 285 void SetSwapUsedIncompleteTileOnImplThread(bool used_incomplete_tile); |
| 283 void MainThreadHasStoppedFlingingOnImplThread(); | 286 void MainThreadHasStoppedFlingingOnImplThread(); |
| 284 void SetInputThrottledUntilCommitOnImplThread(bool is_throttled); | 287 void SetInputThrottledUntilCommitOnImplThread(bool is_throttled); |
| 285 void SetDebugStateOnImplThread(const LayerTreeDebugState& debug_state); | 288 void SetDebugStateOnImplThread(const LayerTreeDebugState& debug_state); |
| 286 void SetDeferCommitsOnImplThread(bool defer_commits) const; | 289 void SetDeferCommitsOnImplThread(bool defer_commits) const; |
| 290 void RecordMainFrameTiming(); | |
| 287 | 291 |
| 288 LayerTreeHost* layer_tree_host(); | 292 LayerTreeHost* layer_tree_host(); |
| 289 const LayerTreeHost* layer_tree_host() const; | 293 const LayerTreeHost* layer_tree_host() const; |
| 290 | 294 |
| 291 // Use accessors instead of this variable directly. | 295 // Use accessors instead of this variable directly. |
| 292 MainThreadOnly main_thread_only_vars_unsafe_; | 296 MainThreadOnly main_thread_only_vars_unsafe_; |
| 293 MainThreadOnly& main(); | 297 MainThreadOnly& main(); |
| 294 | 298 |
| 295 // Use accessors instead of this variable directly. | 299 // Use accessors instead of this variable directly. |
| 296 MainThreadOrBlockedMainThread main_thread_or_blocked_vars_unsafe_; | 300 MainThreadOrBlockedMainThread main_thread_or_blocked_vars_unsafe_; |
| 297 MainThreadOrBlockedMainThread& blocked_main(); | 301 MainThreadOrBlockedMainThread& blocked_main(); |
| 298 | 302 |
| 299 // Use accessors instead of this variable directly. | 303 // Use accessors instead of this variable directly. |
| 300 CompositorThreadOnly compositor_thread_vars_unsafe_; | 304 CompositorThreadOnly compositor_thread_vars_unsafe_; |
| 301 CompositorThreadOnly& impl(); | 305 CompositorThreadOnly& impl(); |
| 302 | 306 |
| 303 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; | 307 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; |
| 304 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; | 308 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; |
| 305 | 309 |
| 306 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); | 310 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); |
| 307 }; | 311 }; |
| 308 | 312 |
| 309 } // namespace cc | 313 } // namespace cc |
| 310 | 314 |
| 311 #endif // CC_TREES_THREAD_PROXY_H_ | 315 #endif // CC_TREES_THREAD_PROXY_H_ |
| OLD | NEW |