| 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 "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "cc/base/thread.h" | 10 #include "cc/base/thread.h" |
| (...skipping 1351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1362 base::Bind(&ThreadProxy::StartScrollbarAnimationOnImplThread, | 1362 base::Bind(&ThreadProxy::StartScrollbarAnimationOnImplThread, |
| 1363 impl_thread_weak_ptr_), | 1363 impl_thread_weak_ptr_), |
| 1364 delay); | 1364 delay); |
| 1365 } | 1365 } |
| 1366 | 1366 |
| 1367 void ThreadProxy::StartScrollbarAnimationOnImplThread() { | 1367 void ThreadProxy::StartScrollbarAnimationOnImplThread() { |
| 1368 layer_tree_host_impl_->StartScrollbarAnimation( | 1368 layer_tree_host_impl_->StartScrollbarAnimation( |
| 1369 layer_tree_host_impl_->CurrentFrameTimeTicks()); | 1369 layer_tree_host_impl_->CurrentFrameTimeTicks()); |
| 1370 } | 1370 } |
| 1371 | 1371 |
| 1372 void ThreadProxy::DidReceiveLastInputEventForBeginFrameOnImplThread( | |
| 1373 base::TimeTicks frame_time) { | |
| 1374 if (begin_frame_scheduling_enabled_) { | |
| 1375 TRACE_EVENT0("cc", | |
| 1376 "ThreadProxy::DidReceiveLastInputEventForBeginFrameOnImplThread"); | |
| 1377 BeginFrameOnImplThread(frame_time); | |
| 1378 } | |
| 1379 } | |
| 1380 | |
| 1381 void ThreadProxy::DidActivatePendingTree() { | 1372 void ThreadProxy::DidActivatePendingTree() { |
| 1382 DCHECK(IsImplThread()); | 1373 DCHECK(IsImplThread()); |
| 1383 TRACE_EVENT0("cc", "ThreadProxy::DidActivatePendingTreeOnImplThread"); | 1374 TRACE_EVENT0("cc", "ThreadProxy::DidActivatePendingTreeOnImplThread"); |
| 1384 | 1375 |
| 1385 if (completion_event_for_commit_held_on_tree_activation_ && | 1376 if (completion_event_for_commit_held_on_tree_activation_ && |
| 1386 !layer_tree_host_impl_->pending_tree()) { | 1377 !layer_tree_host_impl_->pending_tree()) { |
| 1387 TRACE_EVENT_INSTANT0("cc", "ReleaseCommitbyActivation", | 1378 TRACE_EVENT_INSTANT0("cc", "ReleaseCommitbyActivation", |
| 1388 TRACE_EVENT_SCOPE_THREAD); | 1379 TRACE_EVENT_SCOPE_THREAD); |
| 1389 DCHECK(layer_tree_host_impl_->settings().impl_side_painting); | 1380 DCHECK(layer_tree_host_impl_->settings().impl_side_painting); |
| 1390 completion_event_for_commit_held_on_tree_activation_->Signal(); | 1381 completion_event_for_commit_held_on_tree_activation_->Signal(); |
| 1391 completion_event_for_commit_held_on_tree_activation_ = NULL; | 1382 completion_event_for_commit_held_on_tree_activation_ = NULL; |
| 1392 } | 1383 } |
| 1393 } | 1384 } |
| 1394 | 1385 |
| 1395 } // namespace cc | 1386 } // namespace cc |
| OLD | NEW |