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 DidInitializeVisibleTileOnImplThread() OVERRIDE; | 78 virtual void DidInitializeVisibleTileOnImplThread() OVERRIDE; |
78 virtual void SetNeedsCommitOnImplThread() OVERRIDE; | 79 virtual void SetNeedsCommitOnImplThread() OVERRIDE; |
79 virtual void PostAnimationEventsToMainThreadOnImplThread( | 80 virtual void PostAnimationEventsToMainThreadOnImplThread( |
80 scoped_ptr<AnimationEventsVector> queue, | 81 scoped_ptr<AnimationEventsVector> queue, |
81 base::Time wall_clock_time) OVERRIDE; | 82 base::Time wall_clock_time) OVERRIDE; |
82 virtual bool ReduceContentsTextureMemoryOnImplThread(size_t limit_bytes, | 83 virtual bool ReduceContentsTextureMemoryOnImplThread(size_t limit_bytes, |
(...skipping 16 matching lines...) Expand all Loading... |
99 virtual DrawSwapReadbackResult ScheduledActionDrawAndReadback() OVERRIDE; | 100 virtual DrawSwapReadbackResult ScheduledActionDrawAndReadback() OVERRIDE; |
100 virtual void ScheduledActionCommit() OVERRIDE; | 101 virtual void ScheduledActionCommit() OVERRIDE; |
101 virtual void ScheduledActionUpdateVisibleTiles() OVERRIDE; | 102 virtual void ScheduledActionUpdateVisibleTiles() OVERRIDE; |
102 virtual void ScheduledActionActivatePendingTree() OVERRIDE; | 103 virtual void ScheduledActionActivatePendingTree() OVERRIDE; |
103 virtual void ScheduledActionBeginOutputSurfaceCreation() OVERRIDE; | 104 virtual void ScheduledActionBeginOutputSurfaceCreation() OVERRIDE; |
104 virtual void ScheduledActionAcquireLayerTexturesForMainThread() OVERRIDE; | 105 virtual void ScheduledActionAcquireLayerTexturesForMainThread() OVERRIDE; |
105 virtual void DidAnticipatedDrawTimeChange(base::TimeTicks time) OVERRIDE; | 106 virtual void DidAnticipatedDrawTimeChange(base::TimeTicks time) OVERRIDE; |
106 virtual base::TimeDelta DrawDurationEstimate() OVERRIDE; | 107 virtual base::TimeDelta DrawDurationEstimate() OVERRIDE; |
107 virtual base::TimeDelta BeginFrameToCommitDurationEstimate() OVERRIDE; | 108 virtual base::TimeDelta BeginFrameToCommitDurationEstimate() OVERRIDE; |
108 virtual base::TimeDelta CommitToActivateDurationEstimate() OVERRIDE; | 109 virtual base::TimeDelta CommitToActivateDurationEstimate() OVERRIDE; |
| 110 virtual void PostBeginFrameDeadline(const base::Closure& closure, |
| 111 base::TimeTicks deadline) OVERRIDE; |
109 | 112 |
110 // ResourceUpdateControllerClient implementation | 113 // ResourceUpdateControllerClient implementation |
111 virtual void ReadyToFinalizeTextureUpdates() OVERRIDE; | 114 virtual void ReadyToFinalizeTextureUpdates() OVERRIDE; |
112 | 115 |
113 private: | 116 private: |
114 ThreadProxy(LayerTreeHost* layer_tree_host, | 117 ThreadProxy(LayerTreeHost* layer_tree_host, |
115 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); | 118 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); |
116 | 119 |
117 struct BeginFrameAndCommitState { | 120 struct BeginFrameAndCommitState { |
118 BeginFrameAndCommitState(); | 121 BeginFrameAndCommitState(); |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 bool inside_commit_; | 216 bool inside_commit_; |
214 | 217 |
215 base::WeakPtrFactory<ThreadProxy> weak_factory_on_impl_thread_; | 218 base::WeakPtrFactory<ThreadProxy> weak_factory_on_impl_thread_; |
216 | 219 |
217 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; | 220 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; |
218 base::WeakPtrFactory<ThreadProxy> weak_factory_; | 221 base::WeakPtrFactory<ThreadProxy> weak_factory_; |
219 | 222 |
220 scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl_; | 223 scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl_; |
221 | 224 |
222 scoped_ptr<Scheduler> scheduler_on_impl_thread_; | 225 scoped_ptr<Scheduler> scheduler_on_impl_thread_; |
| 226 bool frame_did_draw_; |
223 | 227 |
224 // Set when the main thread is waiting on a | 228 // Set when the main thread is waiting on a |
225 // ScheduledActionSendBeginFrameToMainThread to be issued. | 229 // ScheduledActionSendBeginFrameToMainThread to be issued. |
226 CompletionEvent* | 230 CompletionEvent* |
227 begin_frame_sent_to_main_thread_completion_event_on_impl_thread_; | 231 begin_frame_sent_to_main_thread_completion_event_on_impl_thread_; |
228 | 232 |
229 // Set when the main thread is waiting on a readback. | 233 // Set when the main thread is waiting on a readback. |
230 ReadbackRequest* readback_request_on_impl_thread_; | 234 ReadbackRequest* readback_request_on_impl_thread_; |
231 | 235 |
232 // Set when the main thread is waiting on a commit to complete. | 236 // 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... |
269 // activation_duration_history_. | 273 // activation_duration_history_. |
270 base::TimeTicks begin_frame_sent_to_main_thread_time_; | 274 base::TimeTicks begin_frame_sent_to_main_thread_time_; |
271 base::TimeTicks commit_complete_time_; | 275 base::TimeTicks commit_complete_time_; |
272 | 276 |
273 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); | 277 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); |
274 }; | 278 }; |
275 | 279 |
276 } // namespace cc | 280 } // namespace cc |
277 | 281 |
278 #endif // CC_TREES_THREAD_PROXY_H_ | 282 #endif // CC_TREES_THREAD_PROXY_H_ |
OLD | NEW |