| 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 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 base::Bind(&ThreadProxy::DidCompleteSwapBuffers, main_thread_weak_ptr_)); | 349 base::Bind(&ThreadProxy::DidCompleteSwapBuffers, main_thread_weak_ptr_)); |
| 350 } | 350 } |
| 351 | 351 |
| 352 void ThreadProxy::SetNeedsBeginFrameOnImplThread(bool enable) { | 352 void ThreadProxy::SetNeedsBeginFrameOnImplThread(bool enable) { |
| 353 DCHECK(IsImplThread()); | 353 DCHECK(IsImplThread()); |
| 354 TRACE_EVENT1("cc", "ThreadProxy::SetNeedsBeginFrameOnImplThread", | 354 TRACE_EVENT1("cc", "ThreadProxy::SetNeedsBeginFrameOnImplThread", |
| 355 "enable", enable); | 355 "enable", enable); |
| 356 layer_tree_host_impl_->SetNeedsBeginFrame(enable); | 356 layer_tree_host_impl_->SetNeedsBeginFrame(enable); |
| 357 } | 357 } |
| 358 | 358 |
| 359 void ThreadProxy::BeginFrameOnImplThread(base::TimeTicks frame_time) { | 359 void ThreadProxy::BeginFrameOnImplThread(BeginFrameArgs args) { |
| 360 DCHECK(IsImplThread()); | 360 DCHECK(IsImplThread()); |
| 361 TRACE_EVENT0("cc", "ThreadProxy::BeginFrameOnImplThread"); | 361 TRACE_EVENT0("cc", "ThreadProxy::BeginFrameOnImplThread"); |
| 362 scheduler_on_impl_thread_->BeginFrame(frame_time); | 362 scheduler_on_impl_thread_->BeginFrame(args); |
| 363 } | 363 } |
| 364 | 364 |
| 365 void ThreadProxy::OnCanDrawStateChanged(bool can_draw) { | 365 void ThreadProxy::OnCanDrawStateChanged(bool can_draw) { |
| 366 DCHECK(IsImplThread()); | 366 DCHECK(IsImplThread()); |
| 367 TRACE_EVENT1( | 367 TRACE_EVENT1( |
| 368 "cc", "ThreadProxy::OnCanDrawStateChanged", "can_draw", can_draw); | 368 "cc", "ThreadProxy::OnCanDrawStateChanged", "can_draw", can_draw); |
| 369 scheduler_on_impl_thread_->SetCanDraw(can_draw); | 369 scheduler_on_impl_thread_->SetCanDraw(can_draw); |
| 370 layer_tree_host_impl_->UpdateBackgroundAnimateTicking( | 370 layer_tree_host_impl_->UpdateBackgroundAnimateTicking( |
| 371 !scheduler_on_impl_thread_->WillDrawIfNeeded()); | 371 !scheduler_on_impl_thread_->WillDrawIfNeeded()); |
| 372 } | 372 } |
| (...skipping 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1376 !layer_tree_host_impl_->pending_tree()) { | 1376 !layer_tree_host_impl_->pending_tree()) { |
| 1377 TRACE_EVENT_INSTANT0("cc", "ReleaseCommitbyActivation", | 1377 TRACE_EVENT_INSTANT0("cc", "ReleaseCommitbyActivation", |
| 1378 TRACE_EVENT_SCOPE_THREAD); | 1378 TRACE_EVENT_SCOPE_THREAD); |
| 1379 DCHECK(layer_tree_host_impl_->settings().impl_side_painting); | 1379 DCHECK(layer_tree_host_impl_->settings().impl_side_painting); |
| 1380 completion_event_for_commit_held_on_tree_activation_->Signal(); | 1380 completion_event_for_commit_held_on_tree_activation_->Signal(); |
| 1381 completion_event_for_commit_held_on_tree_activation_ = NULL; | 1381 completion_event_for_commit_held_on_tree_activation_ = NULL; |
| 1382 } | 1382 } |
| 1383 } | 1383 } |
| 1384 | 1384 |
| 1385 } // namespace cc | 1385 } // namespace cc |
| OLD | NEW |