| 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 #include "cc/trees/thread_proxy.h" | 5 #include "cc/trees/thread_proxy.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 // to the main thread for the last frame that we've processed. If that is | 335 // to the main thread for the last frame that we've processed. If that is |
| 336 // set, that means the current frame is one past the frame in which we've | 336 // set, that means the current frame is one past the frame in which we've |
| 337 // finished the processing. | 337 // finished the processing. |
| 338 impl().layer_tree_host_impl->RecordMainFrameTiming( | 338 impl().layer_tree_host_impl->RecordMainFrameTiming( |
| 339 impl().last_processed_begin_main_frame_args, | 339 impl().last_processed_begin_main_frame_args, |
| 340 impl().layer_tree_host_impl->CurrentBeginFrameArgs()); | 340 impl().layer_tree_host_impl->CurrentBeginFrameArgs()); |
| 341 impl().last_processed_begin_main_frame_args = BeginFrameArgs(); | 341 impl().last_processed_begin_main_frame_args = BeginFrameArgs(); |
| 342 } | 342 } |
| 343 } | 343 } |
| 344 | 344 |
| 345 void ThreadProxy::OnResourcelessSoftareDrawStateChanged( | |
| 346 bool resourceless_draw) { | |
| 347 DCHECK(IsImplThread()); | |
| 348 impl().scheduler->SetResourcelessSoftareDraw(resourceless_draw); | |
| 349 } | |
| 350 | |
| 351 void ThreadProxy::OnCanDrawStateChanged(bool can_draw) { | 345 void ThreadProxy::OnCanDrawStateChanged(bool can_draw) { |
| 352 TRACE_EVENT1( | 346 TRACE_EVENT1( |
| 353 "cc", "ThreadProxy::OnCanDrawStateChanged", "can_draw", can_draw); | 347 "cc", "ThreadProxy::OnCanDrawStateChanged", "can_draw", can_draw); |
| 354 DCHECK(IsImplThread()); | 348 DCHECK(IsImplThread()); |
| 355 impl().scheduler->SetCanDraw(can_draw); | 349 impl().scheduler->SetCanDraw(can_draw); |
| 356 } | 350 } |
| 357 | 351 |
| 358 void ThreadProxy::NotifyReadyToActivate() { | 352 void ThreadProxy::NotifyReadyToActivate() { |
| 359 TRACE_EVENT0("cc", "ThreadProxy::NotifyReadyToActivate"); | 353 TRACE_EVENT0("cc", "ThreadProxy::NotifyReadyToActivate"); |
| 360 impl().scheduler->NotifyReadyToActivate(); | 354 impl().scheduler->NotifyReadyToActivate(); |
| (...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1138 void ThreadProxy::DidPrepareTiles() { | 1132 void ThreadProxy::DidPrepareTiles() { |
| 1139 DCHECK(IsImplThread()); | 1133 DCHECK(IsImplThread()); |
| 1140 impl().scheduler->DidPrepareTiles(); | 1134 impl().scheduler->DidPrepareTiles(); |
| 1141 } | 1135 } |
| 1142 | 1136 |
| 1143 void ThreadProxy::DidCompletePageScaleAnimationOnImplThread() { | 1137 void ThreadProxy::DidCompletePageScaleAnimationOnImplThread() { |
| 1144 DCHECK(IsImplThread()); | 1138 DCHECK(IsImplThread()); |
| 1145 impl().channel_impl->DidCompletePageScaleAnimation(); | 1139 impl().channel_impl->DidCompletePageScaleAnimation(); |
| 1146 } | 1140 } |
| 1147 | 1141 |
| 1148 void ThreadProxy::OnDrawForOutputSurface() { | 1142 void ThreadProxy::OnDrawForOutputSurface(bool resourceless_software_draw) { |
| 1149 DCHECK(IsImplThread()); | 1143 DCHECK(IsImplThread()); |
| 1150 impl().scheduler->OnDrawForOutputSurface(); | 1144 impl().scheduler->OnDrawForOutputSurface(resourceless_software_draw); |
| 1151 } | 1145 } |
| 1152 | 1146 |
| 1153 void ThreadProxy::UpdateTopControlsState(TopControlsState constraints, | 1147 void ThreadProxy::UpdateTopControlsState(TopControlsState constraints, |
| 1154 TopControlsState current, | 1148 TopControlsState current, |
| 1155 bool animate) { | 1149 bool animate) { |
| 1156 main().channel_main->UpdateTopControlsStateOnImpl(constraints, current, | 1150 main().channel_main->UpdateTopControlsStateOnImpl(constraints, current, |
| 1157 animate); | 1151 animate); |
| 1158 } | 1152 } |
| 1159 | 1153 |
| 1160 void ThreadProxy::UpdateTopControlsStateOnImpl(TopControlsState constraints, | 1154 void ThreadProxy::UpdateTopControlsStateOnImpl(TopControlsState constraints, |
| (...skipping 22 matching lines...) Expand all Loading... |
| 1183 | 1177 |
| 1184 base::WeakPtr<ProxyMain> ThreadProxy::GetMainWeakPtr() { | 1178 base::WeakPtr<ProxyMain> ThreadProxy::GetMainWeakPtr() { |
| 1185 return main_thread_weak_ptr_; | 1179 return main_thread_weak_ptr_; |
| 1186 } | 1180 } |
| 1187 | 1181 |
| 1188 base::WeakPtr<ProxyImpl> ThreadProxy::GetImplWeakPtr() { | 1182 base::WeakPtr<ProxyImpl> ThreadProxy::GetImplWeakPtr() { |
| 1189 return impl_thread_weak_ptr_; | 1183 return impl_thread_weak_ptr_; |
| 1190 } | 1184 } |
| 1191 | 1185 |
| 1192 } // namespace cc | 1186 } // namespace cc |
| OLD | NEW |