| 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 <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 base::Bind(&ThreadProxy::DidCompleteSwapBuffers, main_thread_weak_ptr_)); | 355 base::Bind(&ThreadProxy::DidCompleteSwapBuffers, main_thread_weak_ptr_)); |
| 356 } | 356 } |
| 357 | 357 |
| 358 void ThreadProxy::SetNeedsBeginFrameOnImplThread(bool enable) { | 358 void ThreadProxy::SetNeedsBeginFrameOnImplThread(bool enable) { |
| 359 DCHECK(IsImplThread()); | 359 DCHECK(IsImplThread()); |
| 360 TRACE_EVENT1("cc", "ThreadProxy::SetNeedsBeginFrameOnImplThread", | 360 TRACE_EVENT1("cc", "ThreadProxy::SetNeedsBeginFrameOnImplThread", |
| 361 "enable", enable); | 361 "enable", enable); |
| 362 layer_tree_host_impl_->SetNeedsBeginFrame(enable); | 362 layer_tree_host_impl_->SetNeedsBeginFrame(enable); |
| 363 } | 363 } |
| 364 | 364 |
| 365 void ThreadProxy::BeginFrameOnImplThread(base::TimeTicks frame_time) { | 365 void ThreadProxy::BeginFrameOnImplThread(const BeginFrameArgs& args) { |
| 366 DCHECK(IsImplThread()); | 366 DCHECK(IsImplThread()); |
| 367 TRACE_EVENT0("cc", "ThreadProxy::BeginFrameOnImplThread"); | 367 TRACE_EVENT0("cc", "ThreadProxy::BeginFrameOnImplThread"); |
| 368 scheduler_on_impl_thread_->BeginFrame(frame_time); | 368 scheduler_on_impl_thread_->BeginFrame(args); |
| 369 } | 369 } |
| 370 | 370 |
| 371 void ThreadProxy::OnCanDrawStateChanged(bool can_draw) { | 371 void ThreadProxy::OnCanDrawStateChanged(bool can_draw) { |
| 372 DCHECK(IsImplThread()); | 372 DCHECK(IsImplThread()); |
| 373 TRACE_EVENT1( | 373 TRACE_EVENT1( |
| 374 "cc", "ThreadProxy::OnCanDrawStateChanged", "can_draw", can_draw); | 374 "cc", "ThreadProxy::OnCanDrawStateChanged", "can_draw", can_draw); |
| 375 scheduler_on_impl_thread_->SetCanDraw(can_draw); | 375 scheduler_on_impl_thread_->SetCanDraw(can_draw); |
| 376 layer_tree_host_impl_->UpdateBackgroundAnimateTicking( | 376 layer_tree_host_impl_->UpdateBackgroundAnimateTicking( |
| 377 !scheduler_on_impl_thread_->WillDrawIfNeeded()); | 377 !scheduler_on_impl_thread_->WillDrawIfNeeded()); |
| 378 } | 378 } |
| (...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1415 !layer_tree_host_impl_->pending_tree()) { | 1415 !layer_tree_host_impl_->pending_tree()) { |
| 1416 TRACE_EVENT_INSTANT0("cc", "ReleaseCommitbyActivation", | 1416 TRACE_EVENT_INSTANT0("cc", "ReleaseCommitbyActivation", |
| 1417 TRACE_EVENT_SCOPE_THREAD); | 1417 TRACE_EVENT_SCOPE_THREAD); |
| 1418 DCHECK(layer_tree_host_impl_->settings().impl_side_painting); | 1418 DCHECK(layer_tree_host_impl_->settings().impl_side_painting); |
| 1419 completion_event_for_commit_held_on_tree_activation_->Signal(); | 1419 completion_event_for_commit_held_on_tree_activation_->Signal(); |
| 1420 completion_event_for_commit_held_on_tree_activation_ = NULL; | 1420 completion_event_for_commit_held_on_tree_activation_ = NULL; |
| 1421 } | 1421 } |
| 1422 } | 1422 } |
| 1423 | 1423 |
| 1424 } // namespace cc | 1424 } // namespace cc |
| OLD | NEW |