| 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 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 base::TimeDelta interval) { | 475 base::TimeDelta interval) { |
| 476 if (scheduler_on_impl_thread_) | 476 if (scheduler_on_impl_thread_) |
| 477 scheduler_on_impl_thread_->CommitVSyncParameters(timebase, interval); | 477 scheduler_on_impl_thread_->CommitVSyncParameters(timebase, interval); |
| 478 } | 478 } |
| 479 | 479 |
| 480 void SingleThreadProxy::SetEstimatedParentDrawTime(base::TimeDelta draw_time) { | 480 void SingleThreadProxy::SetEstimatedParentDrawTime(base::TimeDelta draw_time) { |
| 481 if (scheduler_on_impl_thread_) | 481 if (scheduler_on_impl_thread_) |
| 482 scheduler_on_impl_thread_->SetEstimatedParentDrawTime(draw_time); | 482 scheduler_on_impl_thread_->SetEstimatedParentDrawTime(draw_time); |
| 483 } | 483 } |
| 484 | 484 |
| 485 void SingleThreadProxy::SetMaxSwapsPendingOnImplThread(int max) { | |
| 486 if (scheduler_on_impl_thread_) | |
| 487 scheduler_on_impl_thread_->SetMaxSwapsPending(max); | |
| 488 } | |
| 489 | |
| 490 void SingleThreadProxy::DidSwapBuffersOnImplThread() { | 485 void SingleThreadProxy::DidSwapBuffersOnImplThread() { |
| 491 TRACE_EVENT0("cc", "SingleThreadProxy::DidSwapBuffersOnImplThread"); | 486 TRACE_EVENT0("cc", "SingleThreadProxy::DidSwapBuffersOnImplThread"); |
| 492 if (scheduler_on_impl_thread_) | 487 if (scheduler_on_impl_thread_) |
| 493 scheduler_on_impl_thread_->DidSwapBuffers(); | 488 scheduler_on_impl_thread_->DidSwapBuffers(); |
| 494 client_->DidPostSwapBuffers(); | 489 client_->DidPostSwapBuffers(); |
| 495 } | 490 } |
| 496 | 491 |
| 497 void SingleThreadProxy::DidSwapBuffersCompleteOnImplThread() { | 492 void SingleThreadProxy::DidSwapBuffersCompleteOnImplThread() { |
| 498 TRACE_EVENT0("cc,benchmark", | 493 TRACE_EVENT0("cc,benchmark", |
| 499 "SingleThreadProxy::DidSwapBuffersCompleteOnImplThread"); | 494 "SingleThreadProxy::DidSwapBuffersCompleteOnImplThread"); |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 886 << "DidFinishImplFrame called while not inside an impl frame!"; | 881 << "DidFinishImplFrame called while not inside an impl frame!"; |
| 887 inside_impl_frame_ = false; | 882 inside_impl_frame_ = false; |
| 888 #endif | 883 #endif |
| 889 } | 884 } |
| 890 | 885 |
| 891 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { | 886 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { |
| 892 layer_tree_host_->SendBeginFramesToChildren(args); | 887 layer_tree_host_->SendBeginFramesToChildren(args); |
| 893 } | 888 } |
| 894 | 889 |
| 895 } // namespace cc | 890 } // namespace cc |
| OLD | NEW |