| 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 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 // to the main thread for the last frame that we've processed. If that is | 359 // to the main thread for the last frame that we've processed. If that is |
| 360 // set, that means the current frame is one past the frame in which we've | 360 // set, that means the current frame is one past the frame in which we've |
| 361 // finished the processing. | 361 // finished the processing. |
| 362 impl().layer_tree_host_impl->RecordMainFrameTiming( | 362 impl().layer_tree_host_impl->RecordMainFrameTiming( |
| 363 impl().last_processed_begin_main_frame_args, | 363 impl().last_processed_begin_main_frame_args, |
| 364 impl().layer_tree_host_impl->CurrentBeginFrameArgs()); | 364 impl().layer_tree_host_impl->CurrentBeginFrameArgs()); |
| 365 impl().last_processed_begin_main_frame_args = BeginFrameArgs(); | 365 impl().last_processed_begin_main_frame_args = BeginFrameArgs(); |
| 366 } | 366 } |
| 367 } | 367 } |
| 368 | 368 |
| 369 void ThreadProxy::OnResourcelessSoftareDrawStateChanged( |
| 370 bool resourceless_draw) { |
| 371 DCHECK(IsImplThread()); |
| 372 impl().scheduler->SetResourcelessSoftareDraw(resourceless_draw); |
| 373 } |
| 374 |
| 369 void ThreadProxy::OnCanDrawStateChanged(bool can_draw) { | 375 void ThreadProxy::OnCanDrawStateChanged(bool can_draw) { |
| 370 TRACE_EVENT1( | 376 TRACE_EVENT1( |
| 371 "cc", "ThreadProxy::OnCanDrawStateChanged", "can_draw", can_draw); | 377 "cc", "ThreadProxy::OnCanDrawStateChanged", "can_draw", can_draw); |
| 372 DCHECK(IsImplThread()); | 378 DCHECK(IsImplThread()); |
| 373 impl().scheduler->SetCanDraw(can_draw); | 379 impl().scheduler->SetCanDraw(can_draw); |
| 374 } | 380 } |
| 375 | 381 |
| 376 void ThreadProxy::NotifyReadyToActivate() { | 382 void ThreadProxy::NotifyReadyToActivate() { |
| 377 TRACE_EVENT0("cc", "ThreadProxy::NotifyReadyToActivate"); | 383 TRACE_EVENT0("cc", "ThreadProxy::NotifyReadyToActivate"); |
| 378 impl().scheduler->NotifyReadyToActivate(); | 384 impl().scheduler->NotifyReadyToActivate(); |
| (...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1264 | 1270 |
| 1265 base::WeakPtr<ProxyMain> ThreadProxy::GetMainWeakPtr() { | 1271 base::WeakPtr<ProxyMain> ThreadProxy::GetMainWeakPtr() { |
| 1266 return main_thread_weak_ptr_; | 1272 return main_thread_weak_ptr_; |
| 1267 } | 1273 } |
| 1268 | 1274 |
| 1269 base::WeakPtr<ProxyImpl> ThreadProxy::GetImplWeakPtr() { | 1275 base::WeakPtr<ProxyImpl> ThreadProxy::GetImplWeakPtr() { |
| 1270 return impl_thread_weak_ptr_; | 1276 return impl_thread_weak_ptr_; |
| 1271 } | 1277 } |
| 1272 | 1278 |
| 1273 } // namespace cc | 1279 } // namespace cc |
| OLD | NEW |