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_SINGLE_THREAD_PROXY_H_ | 5 #ifndef CC_TREES_SINGLE_THREAD_PROXY_H_ |
6 #define CC_TREES_SINGLE_THREAD_PROXY_H_ | 6 #define CC_TREES_SINGLE_THREAD_PROXY_H_ |
7 | 7 |
8 #include <limits> | 8 #include <limits> |
9 | 9 |
10 #include "base/cancelable_callback.h" | 10 #include "base/cancelable_callback.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 void Stop() override; | 59 void Stop() override; |
60 size_t MaxPartialTextureUpdates() const override; | 60 size_t MaxPartialTextureUpdates() const override; |
61 void ForceSerializeOnSwapBuffers() override; | 61 void ForceSerializeOnSwapBuffers() override; |
62 bool SupportsImplScrolling() const override; | 62 bool SupportsImplScrolling() const override; |
63 bool MainFrameWillHappenForTesting() override; | 63 bool MainFrameWillHappenForTesting() override; |
64 void SetChildrenNeedBeginFrames(bool children_need_begin_frames) override; | 64 void SetChildrenNeedBeginFrames(bool children_need_begin_frames) override; |
65 void SetAuthoritativeVSyncInterval(const base::TimeDelta& interval) override; | 65 void SetAuthoritativeVSyncInterval(const base::TimeDelta& interval) override; |
66 | 66 |
67 // SchedulerClient implementation | 67 // SchedulerClient implementation |
68 void WillBeginImplFrame(const BeginFrameArgs& args) override; | 68 void WillBeginImplFrame(const BeginFrameArgs& args) override; |
| 69 void DidFinishImplFrame() override; |
69 void ScheduledActionSendBeginMainFrame() override; | 70 void ScheduledActionSendBeginMainFrame() override; |
70 DrawResult ScheduledActionDrawAndSwapIfPossible() override; | 71 DrawResult ScheduledActionDrawAndSwapIfPossible() override; |
71 DrawResult ScheduledActionDrawAndSwapForced() override; | 72 DrawResult ScheduledActionDrawAndSwapForced() override; |
72 void ScheduledActionCommit() override; | 73 void ScheduledActionCommit() override; |
73 void ScheduledActionAnimate() override; | 74 void ScheduledActionAnimate() override; |
74 void ScheduledActionActivateSyncTree() override; | 75 void ScheduledActionActivateSyncTree() override; |
75 void ScheduledActionBeginOutputSurfaceCreation() override; | 76 void ScheduledActionBeginOutputSurfaceCreation() override; |
76 void ScheduledActionPrepareTiles() override; | 77 void ScheduledActionPrepareTiles() override; |
77 void ScheduledActionInvalidateOutputSurface() override; | 78 void ScheduledActionInvalidateOutputSurface() override; |
78 void DidAnticipatedDrawTimeChange(base::TimeTicks time) override; | 79 void DidAnticipatedDrawTimeChange(base::TimeTicks time) override; |
79 base::TimeDelta DrawDurationEstimate() override; | 80 base::TimeDelta DrawDurationEstimate() override; |
80 base::TimeDelta BeginMainFrameToCommitDurationEstimate() override; | 81 base::TimeDelta BeginMainFrameToCommitDurationEstimate() override; |
81 base::TimeDelta CommitToActivateDurationEstimate() override; | 82 base::TimeDelta CommitToActivateDurationEstimate() override; |
82 void DidBeginImplFrameDeadline() override; | |
83 void SendBeginFramesToChildren(const BeginFrameArgs& args) override; | 83 void SendBeginFramesToChildren(const BeginFrameArgs& args) override; |
84 void SendBeginMainFrameNotExpectedSoon() override; | 84 void SendBeginMainFrameNotExpectedSoon() override; |
85 | 85 |
86 // LayerTreeHostImplClient implementation | 86 // LayerTreeHostImplClient implementation |
87 void UpdateRendererCapabilitiesOnImplThread() override; | 87 void UpdateRendererCapabilitiesOnImplThread() override; |
88 void DidLoseOutputSurfaceOnImplThread() override; | 88 void DidLoseOutputSurfaceOnImplThread() override; |
89 void CommitVSyncParameters(base::TimeTicks timebase, | 89 void CommitVSyncParameters(base::TimeTicks timebase, |
90 base::TimeDelta interval) override; | 90 base::TimeDelta interval) override; |
91 void SetEstimatedParentDrawTime(base::TimeDelta draw_time) override; | 91 void SetEstimatedParentDrawTime(base::TimeDelta draw_time) override; |
92 void SetMaxSwapsPendingOnImplThread(int max) override; | 92 void SetMaxSwapsPendingOnImplThread(int max) override; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 RendererCapabilities renderer_capabilities_for_main_thread_; | 152 RendererCapabilities renderer_capabilities_for_main_thread_; |
153 | 153 |
154 // Accessed from both threads. | 154 // Accessed from both threads. |
155 scoped_ptr<Scheduler> scheduler_on_impl_thread_; | 155 scoped_ptr<Scheduler> scheduler_on_impl_thread_; |
156 ProxyTimingHistory timing_history_; | 156 ProxyTimingHistory timing_history_; |
157 | 157 |
158 scoped_ptr<BlockingTaskRunner::CapturePostTasks> commit_blocking_task_runner_; | 158 scoped_ptr<BlockingTaskRunner::CapturePostTasks> commit_blocking_task_runner_; |
159 scoped_ptr<ResourceUpdateQueue> queue_for_commit_; | 159 scoped_ptr<ResourceUpdateQueue> queue_for_commit_; |
160 bool next_frame_is_newly_committed_frame_; | 160 bool next_frame_is_newly_committed_frame_; |
161 | 161 |
| 162 #if DCHECK_IS_ON() |
162 bool inside_impl_frame_; | 163 bool inside_impl_frame_; |
| 164 #endif |
163 bool inside_draw_; | 165 bool inside_draw_; |
164 bool defer_commits_; | 166 bool defer_commits_; |
165 bool animate_requested_; | 167 bool animate_requested_; |
166 bool commit_requested_; | 168 bool commit_requested_; |
167 bool inside_synchronous_composite_; | 169 bool inside_synchronous_composite_; |
168 | 170 |
169 // True if a request to the LayerTreeHostClient to create an output surface | 171 // True if a request to the LayerTreeHostClient to create an output surface |
170 // is still outstanding. | 172 // is still outstanding. |
171 bool output_surface_creation_requested_; | 173 bool output_surface_creation_requested_; |
172 | 174 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 private: | 237 private: |
236 DebugScopedSetImplThread impl_thread_; | 238 DebugScopedSetImplThread impl_thread_; |
237 DebugScopedSetMainThreadBlocked main_thread_blocked_; | 239 DebugScopedSetMainThreadBlocked main_thread_blocked_; |
238 | 240 |
239 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked); | 241 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked); |
240 }; | 242 }; |
241 | 243 |
242 } // namespace cc | 244 } // namespace cc |
243 | 245 |
244 #endif // CC_TREES_SINGLE_THREAD_PROXY_H_ | 246 #endif // CC_TREES_SINGLE_THREAD_PROXY_H_ |
OLD | NEW |