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 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 TRACE_EVENT0("cc", "ThreadProxy::DidVSync"); | 333 TRACE_EVENT0("cc", "ThreadProxy::DidVSync"); |
334 if (vsync_client_) | 334 if (vsync_client_) |
335 vsync_client_->DidVSync(frame_time); | 335 vsync_client_->DidVSync(frame_time); |
336 } | 336 } |
337 | 337 |
338 void ThreadProxy::RequestVSyncNotification(VSyncClient* client) { | 338 void ThreadProxy::RequestVSyncNotification(VSyncClient* client) { |
339 DCHECK(IsImplThread()); | 339 DCHECK(IsImplThread()); |
340 TRACE_EVENT1( | 340 TRACE_EVENT1( |
341 "cc", "ThreadProxy::RequestVSyncNotification", "enable", !!client); | 341 "cc", "ThreadProxy::RequestVSyncNotification", "enable", !!client); |
342 vsync_client_ = client; | 342 vsync_client_ = client; |
343 layer_tree_host_impl_->EnableVSyncNotification(!!client); | 343 layer_tree_host_impl_->EnableVSyncNotification(client); |
344 } | 344 } |
345 | 345 |
346 void ThreadProxy::OnCanDrawStateChanged(bool can_draw) { | 346 void ThreadProxy::OnCanDrawStateChanged(bool can_draw) { |
347 DCHECK(IsImplThread()); | 347 DCHECK(IsImplThread()); |
348 TRACE_EVENT1( | 348 TRACE_EVENT1( |
349 "cc", "ThreadProxy::OnCanDrawStateChanged", "can_draw", can_draw); | 349 "cc", "ThreadProxy::OnCanDrawStateChanged", "can_draw", can_draw); |
350 scheduler_on_impl_thread_->SetCanDraw(can_draw); | 350 scheduler_on_impl_thread_->SetCanDraw(can_draw); |
351 } | 351 } |
352 | 352 |
353 void ThreadProxy::OnHasPendingTreeStateChanged(bool has_pending_tree) { | 353 void ThreadProxy::OnHasPendingTreeStateChanged(bool has_pending_tree) { |
(...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1313 base::Bind(&ThreadProxy::StartScrollbarAnimationOnImplThread, | 1313 base::Bind(&ThreadProxy::StartScrollbarAnimationOnImplThread, |
1314 impl_thread_weak_ptr_), | 1314 impl_thread_weak_ptr_), |
1315 delay); | 1315 delay); |
1316 } | 1316 } |
1317 | 1317 |
1318 void ThreadProxy::StartScrollbarAnimationOnImplThread() { | 1318 void ThreadProxy::StartScrollbarAnimationOnImplThread() { |
1319 layer_tree_host_impl_->StartScrollbarAnimation(base::TimeTicks::Now()); | 1319 layer_tree_host_impl_->StartScrollbarAnimation(base::TimeTicks::Now()); |
1320 } | 1320 } |
1321 | 1321 |
1322 } // namespace cc | 1322 } // namespace cc |
OLD | NEW |