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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 bool IsInsideDraw() override; | 93 bool IsInsideDraw() override; |
94 void RenewTreePriority() override {} | 94 void RenewTreePriority() override {} |
95 void PostDelayedAnimationTaskOnImplThread(const base::Closure& task, | 95 void PostDelayedAnimationTaskOnImplThread(const base::Closure& task, |
96 base::TimeDelta delay) override {} | 96 base::TimeDelta delay) override {} |
97 void DidActivateSyncTree() override; | 97 void DidActivateSyncTree() override; |
98 void WillPrepareTiles() override; | 98 void WillPrepareTiles() override; |
99 void DidPrepareTiles() override; | 99 void DidPrepareTiles() override; |
100 void DidCompletePageScaleAnimationOnImplThread() override; | 100 void DidCompletePageScaleAnimationOnImplThread() override; |
101 void OnDrawForCompositorFrameSink(bool resourceless_software_draw) override; | 101 void OnDrawForCompositorFrameSink(bool resourceless_software_draw) override; |
102 void NeedsImplSideInvalidation() override; | 102 void NeedsImplSideInvalidation() override; |
| 103 void NotifyImageDecodeRequestFinished() override; |
103 | 104 |
104 void RequestNewCompositorFrameSink(); | 105 void RequestNewCompositorFrameSink(); |
105 | 106 |
106 // Called by the legacy path where RenderWidget does the scheduling. | 107 // Called by the legacy path where RenderWidget does the scheduling. |
107 void CompositeImmediately(base::TimeTicks frame_begin_time); | 108 void CompositeImmediately(base::TimeTicks frame_begin_time); |
108 | 109 |
109 protected: | 110 protected: |
110 SingleThreadProxy(LayerTreeHost* layer_tree_host, | 111 SingleThreadProxy(LayerTreeHost* layer_tree_host, |
111 LayerTreeHostSingleThreadClient* client, | 112 LayerTreeHostSingleThreadClient* client, |
112 TaskRunnerProvider* task_runner_provider); | 113 TaskRunnerProvider* task_runner_provider); |
113 | 114 |
114 private: | 115 private: |
115 void BeginMainFrame(const BeginFrameArgs& begin_frame_args); | 116 void BeginMainFrame(const BeginFrameArgs& begin_frame_args); |
116 void BeginMainFrameAbortedOnImplThread(CommitEarlyOutReason reason); | 117 void BeginMainFrameAbortedOnImplThread(CommitEarlyOutReason reason); |
117 void DoBeginMainFrame(const BeginFrameArgs& begin_frame_args); | 118 void DoBeginMainFrame(const BeginFrameArgs& begin_frame_args); |
118 void DoPainting(); | 119 void DoPainting(); |
119 void DoCommit(); | 120 void DoCommit(); |
120 DrawResult DoComposite(LayerTreeHostImpl::FrameData* frame); | 121 DrawResult DoComposite(LayerTreeHostImpl::FrameData* frame); |
121 void DoSwap(); | 122 void DoSwap(); |
122 void DidCommitAndDrawFrame(); | 123 void DidCommitAndDrawFrame(); |
123 void CommitComplete(); | 124 void CommitComplete(); |
124 | 125 |
125 bool ShouldComposite() const; | 126 bool ShouldComposite() const; |
126 void ScheduleRequestNewCompositorFrameSink(); | 127 void ScheduleRequestNewCompositorFrameSink(); |
| 128 void IssueImageDecodeFinishedCallbacks(); |
127 | 129 |
128 void DidReceiveCompositorFrameAck(); | 130 void DidReceiveCompositorFrameAck(); |
129 | 131 |
130 // Accessed on main thread only. | 132 // Accessed on main thread only. |
131 LayerTreeHost* layer_tree_host_; | 133 LayerTreeHost* layer_tree_host_; |
132 LayerTreeHostSingleThreadClient* single_thread_client_; | 134 LayerTreeHostSingleThreadClient* single_thread_client_; |
133 | 135 |
134 TaskRunnerProvider* task_runner_provider_; | 136 TaskRunnerProvider* task_runner_provider_; |
135 | 137 |
136 // Used on the Thread, but checked on main thread during | 138 // Used on the Thread, but checked on main thread during |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 private: | 247 private: |
246 DebugScopedSetImplThread impl_thread_; | 248 DebugScopedSetImplThread impl_thread_; |
247 DebugScopedSetMainThreadBlocked main_thread_blocked_; | 249 DebugScopedSetMainThreadBlocked main_thread_blocked_; |
248 | 250 |
249 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked); | 251 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked); |
250 }; | 252 }; |
251 | 253 |
252 } // namespace cc | 254 } // namespace cc |
253 | 255 |
254 #endif // CC_TREES_SINGLE_THREAD_PROXY_H_ | 256 #endif // CC_TREES_SINGLE_THREAD_PROXY_H_ |
OLD | NEW |