| 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/single_thread_proxy.h" | 5 #include "cc/trees/single_thread_proxy.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/profiler/scoped_tracker.h" | 8 #include "base/profiler/scoped_tracker.h" |
| 9 #include "base/trace_event/trace_event.h" | 9 #include "base/trace_event/trace_event.h" |
| 10 #include "cc/debug/benchmark_instrumentation.h" | 10 #include "cc/debug/benchmark_instrumentation.h" |
| (...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 base::TimeDelta interval) { | 533 base::TimeDelta interval) { |
| 534 if (scheduler_on_impl_thread_) | 534 if (scheduler_on_impl_thread_) |
| 535 scheduler_on_impl_thread_->CommitVSyncParameters(timebase, interval); | 535 scheduler_on_impl_thread_->CommitVSyncParameters(timebase, interval); |
| 536 } | 536 } |
| 537 | 537 |
| 538 void SingleThreadProxy::SetEstimatedParentDrawTime(base::TimeDelta draw_time) { | 538 void SingleThreadProxy::SetEstimatedParentDrawTime(base::TimeDelta draw_time) { |
| 539 if (scheduler_on_impl_thread_) | 539 if (scheduler_on_impl_thread_) |
| 540 scheduler_on_impl_thread_->SetEstimatedParentDrawTime(draw_time); | 540 scheduler_on_impl_thread_->SetEstimatedParentDrawTime(draw_time); |
| 541 } | 541 } |
| 542 | 542 |
| 543 void SingleThreadProxy::SetMaxSwapsPendingOnImplThread(int max) { |
| 544 if (scheduler_on_impl_thread_) |
| 545 scheduler_on_impl_thread_->SetMaxSwapsPending(max); |
| 546 } |
| 547 |
| 543 void SingleThreadProxy::DidSwapBuffersOnImplThread() { | 548 void SingleThreadProxy::DidSwapBuffersOnImplThread() { |
| 544 TRACE_EVENT0("cc", "SingleThreadProxy::DidSwapBuffersOnImplThread"); | 549 TRACE_EVENT0("cc", "SingleThreadProxy::DidSwapBuffersOnImplThread"); |
| 545 if (scheduler_on_impl_thread_) | 550 if (scheduler_on_impl_thread_) |
| 546 scheduler_on_impl_thread_->DidSwapBuffers(); | 551 scheduler_on_impl_thread_->DidSwapBuffers(); |
| 547 client_->DidPostSwapBuffers(); | 552 client_->DidPostSwapBuffers(); |
| 548 } | 553 } |
| 549 | 554 |
| 550 void SingleThreadProxy::DidSwapBuffersCompleteOnImplThread() { | 555 void SingleThreadProxy::DidSwapBuffersCompleteOnImplThread() { |
| 551 TRACE_EVENT0("cc,benchmark", | 556 TRACE_EVENT0("cc,benchmark", |
| 552 "SingleThreadProxy::DidSwapBuffersCompleteOnImplThread"); | 557 "SingleThreadProxy::DidSwapBuffersCompleteOnImplThread"); |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 917 | 922 |
| 918 void SingleThreadProxy::DidBeginImplFrameDeadline() { | 923 void SingleThreadProxy::DidBeginImplFrameDeadline() { |
| 919 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); | 924 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); |
| 920 } | 925 } |
| 921 | 926 |
| 922 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { | 927 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { |
| 923 layer_tree_host_->SendBeginFramesToChildren(args); | 928 layer_tree_host_->SendBeginFramesToChildren(args); |
| 924 } | 929 } |
| 925 | 930 |
| 926 } // namespace cc | 931 } // namespace cc |
| OLD | NEW |