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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 virtual void AcquireLayerTextures() OVERRIDE; | 63 virtual void AcquireLayerTextures() OVERRIDE; |
64 virtual void ForceSerializeOnSwapBuffers() OVERRIDE; | 64 virtual void ForceSerializeOnSwapBuffers() OVERRIDE; |
65 virtual scoped_ptr<base::Value> AsValue() const OVERRIDE; | 65 virtual scoped_ptr<base::Value> AsValue() const OVERRIDE; |
66 virtual bool CommitPendingForTesting() OVERRIDE; | 66 virtual bool CommitPendingForTesting() OVERRIDE; |
67 virtual scoped_ptr<base::Value> SchedulerStateAsValueForTesting() OVERRIDE; | 67 virtual scoped_ptr<base::Value> SchedulerStateAsValueForTesting() OVERRIDE; |
68 | 68 |
69 // LayerTreeHostImplClient implementation | 69 // LayerTreeHostImplClient implementation |
70 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE; | 70 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE; |
71 virtual void OnSwapBuffersCompleteOnImplThread() OVERRIDE; | 71 virtual void OnSwapBuffersCompleteOnImplThread() OVERRIDE; |
72 virtual void BeginFrameOnImplThread(const BeginFrameArgs& args) OVERRIDE; | 72 virtual void BeginFrameOnImplThread(const BeginFrameArgs& args) OVERRIDE; |
| 73 virtual void DidBeginFrameDeadlineOnImplThread() OVERRIDE; |
73 virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE; | 74 virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE; |
74 virtual void NotifyReadyToActivate() OVERRIDE; | 75 virtual void NotifyReadyToActivate() OVERRIDE; |
75 virtual void SetNeedsRedrawOnImplThread() OVERRIDE; | 76 virtual void SetNeedsRedrawOnImplThread() OVERRIDE; |
76 virtual void SetNeedsRedrawRectOnImplThread(gfx::Rect dirty_rect) OVERRIDE; | 77 virtual void SetNeedsRedrawRectOnImplThread(gfx::Rect dirty_rect) OVERRIDE; |
77 virtual void SetNeedsManageTilesOnImplThread() OVERRIDE; | 78 virtual void SetNeedsManageTilesOnImplThread() OVERRIDE; |
78 virtual void DidInitializeVisibleTileOnImplThread() OVERRIDE; | 79 virtual void DidInitializeVisibleTileOnImplThread() OVERRIDE; |
79 virtual void SetNeedsCommitOnImplThread() OVERRIDE; | 80 virtual void SetNeedsCommitOnImplThread() OVERRIDE; |
80 virtual void PostAnimationEventsToMainThreadOnImplThread( | 81 virtual void PostAnimationEventsToMainThreadOnImplThread( |
81 scoped_ptr<AnimationEventsVector> queue, | 82 scoped_ptr<AnimationEventsVector> queue, |
82 base::Time wall_clock_time) OVERRIDE; | 83 base::Time wall_clock_time) OVERRIDE; |
(...skipping 18 matching lines...) Expand all Loading... |
101 virtual void ScheduledActionCommit() OVERRIDE; | 102 virtual void ScheduledActionCommit() OVERRIDE; |
102 virtual void ScheduledActionUpdateVisibleTiles() OVERRIDE; | 103 virtual void ScheduledActionUpdateVisibleTiles() OVERRIDE; |
103 virtual void ScheduledActionActivatePendingTree() OVERRIDE; | 104 virtual void ScheduledActionActivatePendingTree() OVERRIDE; |
104 virtual void ScheduledActionBeginOutputSurfaceCreation() OVERRIDE; | 105 virtual void ScheduledActionBeginOutputSurfaceCreation() OVERRIDE; |
105 virtual void ScheduledActionAcquireLayerTexturesForMainThread() OVERRIDE; | 106 virtual void ScheduledActionAcquireLayerTexturesForMainThread() OVERRIDE; |
106 virtual void ScheduledActionManageTiles() OVERRIDE; | 107 virtual void ScheduledActionManageTiles() OVERRIDE; |
107 virtual void DidAnticipatedDrawTimeChange(base::TimeTicks time) OVERRIDE; | 108 virtual void DidAnticipatedDrawTimeChange(base::TimeTicks time) OVERRIDE; |
108 virtual base::TimeDelta DrawDurationEstimate() OVERRIDE; | 109 virtual base::TimeDelta DrawDurationEstimate() OVERRIDE; |
109 virtual base::TimeDelta BeginFrameToCommitDurationEstimate() OVERRIDE; | 110 virtual base::TimeDelta BeginFrameToCommitDurationEstimate() OVERRIDE; |
110 virtual base::TimeDelta CommitToActivateDurationEstimate() OVERRIDE; | 111 virtual base::TimeDelta CommitToActivateDurationEstimate() OVERRIDE; |
| 112 virtual void PostBeginFrameDeadline(const base::Closure& closure, |
| 113 base::TimeTicks deadline) OVERRIDE; |
111 | 114 |
112 // ResourceUpdateControllerClient implementation | 115 // ResourceUpdateControllerClient implementation |
113 virtual void ReadyToFinalizeTextureUpdates() OVERRIDE; | 116 virtual void ReadyToFinalizeTextureUpdates() OVERRIDE; |
114 | 117 |
115 private: | 118 private: |
116 ThreadProxy(LayerTreeHost* layer_tree_host, | 119 ThreadProxy(LayerTreeHost* layer_tree_host, |
117 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); | 120 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); |
118 | 121 |
119 struct BeginFrameAndCommitState { | 122 struct BeginFrameAndCommitState { |
120 BeginFrameAndCommitState(); | 123 BeginFrameAndCommitState(); |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 bool inside_commit_; | 219 bool inside_commit_; |
217 | 220 |
218 base::WeakPtrFactory<ThreadProxy> weak_factory_on_impl_thread_; | 221 base::WeakPtrFactory<ThreadProxy> weak_factory_on_impl_thread_; |
219 | 222 |
220 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; | 223 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; |
221 base::WeakPtrFactory<ThreadProxy> weak_factory_; | 224 base::WeakPtrFactory<ThreadProxy> weak_factory_; |
222 | 225 |
223 scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl_; | 226 scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl_; |
224 | 227 |
225 scoped_ptr<Scheduler> scheduler_on_impl_thread_; | 228 scoped_ptr<Scheduler> scheduler_on_impl_thread_; |
| 229 bool frame_did_draw_; |
226 | 230 |
227 // Set when the main thread is waiting on a | 231 // Set when the main thread is waiting on a |
228 // ScheduledActionSendBeginFrameToMainThread to be issued. | 232 // ScheduledActionSendBeginFrameToMainThread to be issued. |
229 CompletionEvent* | 233 CompletionEvent* |
230 begin_frame_sent_to_main_thread_completion_event_on_impl_thread_; | 234 begin_frame_sent_to_main_thread_completion_event_on_impl_thread_; |
231 | 235 |
232 // Set when the main thread is waiting on a readback. | 236 // Set when the main thread is waiting on a readback. |
233 ReadbackRequest* readback_request_on_impl_thread_; | 237 ReadbackRequest* readback_request_on_impl_thread_; |
234 | 238 |
235 // Set when the main thread is waiting on a commit to complete. | 239 // Set when the main thread is waiting on a commit to complete. |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 // activation_duration_history_. | 276 // activation_duration_history_. |
273 base::TimeTicks begin_frame_sent_to_main_thread_time_; | 277 base::TimeTicks begin_frame_sent_to_main_thread_time_; |
274 base::TimeTicks commit_complete_time_; | 278 base::TimeTicks commit_complete_time_; |
275 | 279 |
276 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); | 280 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); |
277 }; | 281 }; |
278 | 282 |
279 } // namespace cc | 283 } // namespace cc |
280 | 284 |
281 #endif // CC_TREES_THREAD_PROXY_H_ | 285 #endif // CC_TREES_THREAD_PROXY_H_ |
OLD | NEW |