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