| 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/resources/resource_update_controller.h" | 16 #include "cc/resources/resource_update_controller.h" |
| 16 #include "cc/scheduler/scheduler.h" | 17 #include "cc/scheduler/scheduler.h" |
| 17 #include "cc/trees/layer_tree_host_impl.h" | 18 #include "cc/trees/layer_tree_host_impl.h" |
| 18 #include "cc/trees/proxy.h" | 19 #include "cc/trees/proxy.h" |
| 19 #include "cc/trees/proxy_timing_history.h" | 20 #include "cc/trees/proxy_timing_history.h" |
| 20 | 21 |
| 21 namespace base { | 22 namespace base { |
| 22 class SingleThreadTaskRunner; | 23 class SingleThreadTaskRunner; |
| 23 } | 24 } |
| 24 | 25 |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 bool input_throttled_until_commit; | 128 bool input_throttled_until_commit; |
| 128 | 129 |
| 129 // Set when we freeze animations to avoid checkerboarding. | 130 // Set when we freeze animations to avoid checkerboarding. |
| 130 bool animations_frozen_until_next_draw; | 131 bool animations_frozen_until_next_draw; |
| 131 base::TimeTicks animation_time; | 132 base::TimeTicks animation_time; |
| 132 | 133 |
| 133 // Whether a commit has been completed since the last time animations were | 134 // Whether a commit has been completed since the last time animations were |
| 134 // ticked. If this happens, we need to animate again. | 135 // ticked. If this happens, we need to animate again. |
| 135 bool did_commit_after_animating; | 136 bool did_commit_after_animating; |
| 136 | 137 |
| 137 base::TimeTicks smoothness_takes_priority_expiration_time; | 138 DelayedUniqueNotifier smoothness_priority_expiration_notifier; |
| 138 bool renew_tree_priority_pending; | |
| 139 | 139 |
| 140 ProxyTimingHistory timing_history; | 140 ProxyTimingHistory timing_history; |
| 141 | 141 |
| 142 scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl; | 142 scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl; |
| 143 base::WeakPtrFactory<ThreadProxy> weak_factory; | 143 base::WeakPtrFactory<ThreadProxy> weak_factory; |
| 144 }; | 144 }; |
| 145 | 145 |
| 146 const MainThreadOnly& main() const; | 146 const MainThreadOnly& main() const; |
| 147 const MainThreadOrBlockedMainThread& blocked_main() const; | 147 const MainThreadOrBlockedMainThread& blocked_main() const; |
| 148 const CompositorThreadOnly& impl() const; | 148 const CompositorThreadOnly& impl() const; |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 RendererCapabilities* capabilities); | 268 RendererCapabilities* capabilities); |
| 269 void FinishGLOnImplThread(CompletionEvent* completion); | 269 void FinishGLOnImplThread(CompletionEvent* completion); |
| 270 void LayerTreeHostClosedOnImplThread(CompletionEvent* completion); | 270 void LayerTreeHostClosedOnImplThread(CompletionEvent* completion); |
| 271 DrawResult DrawSwapInternal(bool forced_draw); | 271 DrawResult DrawSwapInternal(bool forced_draw); |
| 272 void ForceSerializeOnSwapBuffersOnImplThread(CompletionEvent* completion); | 272 void ForceSerializeOnSwapBuffersOnImplThread(CompletionEvent* completion); |
| 273 void CheckOutputSurfaceStatusOnImplThread(); | 273 void CheckOutputSurfaceStatusOnImplThread(); |
| 274 void CommitPendingOnImplThreadForTesting(CommitPendingRequest* request); | 274 void CommitPendingOnImplThreadForTesting(CommitPendingRequest* request); |
| 275 void SchedulerAsValueOnImplThreadForTesting(SchedulerStateRequest* request); | 275 void SchedulerAsValueOnImplThreadForTesting(SchedulerStateRequest* request); |
| 276 void AsValueOnImplThread(CompletionEvent* completion, | 276 void AsValueOnImplThread(CompletionEvent* completion, |
| 277 base::DictionaryValue* state) const; | 277 base::DictionaryValue* state) const; |
| 278 void RenewTreePriorityOnImplThread(); | |
| 279 void SetSwapUsedIncompleteTileOnImplThread(bool used_incomplete_tile); | 278 void SetSwapUsedIncompleteTileOnImplThread(bool used_incomplete_tile); |
| 280 void MainThreadHasStoppedFlingingOnImplThread(); | 279 void MainThreadHasStoppedFlingingOnImplThread(); |
| 281 void SetInputThrottledUntilCommitOnImplThread(bool is_throttled); | 280 void SetInputThrottledUntilCommitOnImplThread(bool is_throttled); |
| 282 void SetDebugStateOnImplThread(const LayerTreeDebugState& debug_state); | 281 void SetDebugStateOnImplThread(const LayerTreeDebugState& debug_state); |
| 283 | 282 |
| 284 LayerTreeHost* layer_tree_host(); | 283 LayerTreeHost* layer_tree_host(); |
| 285 const LayerTreeHost* layer_tree_host() const; | 284 const LayerTreeHost* layer_tree_host() const; |
| 286 | 285 |
| 287 // Use accessors instead of this variable directly. | 286 // Use accessors instead of this variable directly. |
| 288 MainThreadOnly main_thread_only_vars_unsafe_; | 287 MainThreadOnly main_thread_only_vars_unsafe_; |
| 289 MainThreadOnly& main(); | 288 MainThreadOnly& main(); |
| 290 | 289 |
| 291 // Use accessors instead of this variable directly. | 290 // Use accessors instead of this variable directly. |
| 292 MainThreadOrBlockedMainThread main_thread_or_blocked_vars_unsafe_; | 291 MainThreadOrBlockedMainThread main_thread_or_blocked_vars_unsafe_; |
| 293 MainThreadOrBlockedMainThread& blocked_main(); | 292 MainThreadOrBlockedMainThread& blocked_main(); |
| 294 | 293 |
| 295 // Use accessors instead of this variable directly. | 294 // Use accessors instead of this variable directly. |
| 296 CompositorThreadOnly compositor_thread_vars_unsafe_; | 295 CompositorThreadOnly compositor_thread_vars_unsafe_; |
| 297 CompositorThreadOnly& impl(); | 296 CompositorThreadOnly& impl(); |
| 298 | 297 |
| 299 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; | 298 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; |
| 300 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; | 299 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; |
| 301 | 300 |
| 302 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); | 301 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); |
| 303 }; | 302 }; |
| 304 | 303 |
| 305 } // namespace cc | 304 } // namespace cc |
| 306 | 305 |
| 307 #endif // CC_TREES_THREAD_PROXY_H_ | 306 #endif // CC_TREES_THREAD_PROXY_H_ |
| OLD | NEW |