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