| 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/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
| 9 #include "cc/debug/benchmark_instrumentation.h" | 9 #include "cc/debug/benchmark_instrumentation.h" |
| 10 #include "cc/output/context_provider.h" | 10 #include "cc/output/context_provider.h" |
| (...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 630 bool SingleThreadProxy::MainFrameWillHappenForTesting() { | 630 bool SingleThreadProxy::MainFrameWillHappenForTesting() { |
| 631 return false; | 631 return false; |
| 632 } | 632 } |
| 633 | 633 |
| 634 void SingleThreadProxy::SetChildrenNeedBeginFrames( | 634 void SingleThreadProxy::SetChildrenNeedBeginFrames( |
| 635 bool children_need_begin_frames) { | 635 bool children_need_begin_frames) { |
| 636 scheduler_on_impl_thread_->SetChildrenNeedBeginFrames( | 636 scheduler_on_impl_thread_->SetChildrenNeedBeginFrames( |
| 637 children_need_begin_frames); | 637 children_need_begin_frames); |
| 638 } | 638 } |
| 639 | 639 |
| 640 void SingleThreadProxy::SetAuthoritativeVSyncInterval( |
| 641 base::TimeDelta interval) { |
| 642 scheduler_on_impl_thread_->SetAuthoritativeVSyncInterval(interval); |
| 643 } |
| 644 |
| 640 void SingleThreadProxy::WillBeginImplFrame(const BeginFrameArgs& args) { | 645 void SingleThreadProxy::WillBeginImplFrame(const BeginFrameArgs& args) { |
| 641 layer_tree_host_impl_->WillBeginImplFrame(args); | 646 layer_tree_host_impl_->WillBeginImplFrame(args); |
| 642 } | 647 } |
| 643 | 648 |
| 644 void SingleThreadProxy::ScheduledActionSendBeginMainFrame() { | 649 void SingleThreadProxy::ScheduledActionSendBeginMainFrame() { |
| 645 TRACE_EVENT0("cc", "SingleThreadProxy::ScheduledActionSendBeginMainFrame"); | 650 TRACE_EVENT0("cc", "SingleThreadProxy::ScheduledActionSendBeginMainFrame"); |
| 646 // Although this proxy is single-threaded, it's problematic to synchronously | 651 // Although this proxy is single-threaded, it's problematic to synchronously |
| 647 // have BeginMainFrame happen after ScheduledActionSendBeginMainFrame. This | 652 // have BeginMainFrame happen after ScheduledActionSendBeginMainFrame. This |
| 648 // could cause a commit to occur in between a series of SetNeedsCommit calls | 653 // could cause a commit to occur in between a series of SetNeedsCommit calls |
| 649 // (i.e. property modifications) causing some to fall on one frame and some to | 654 // (i.e. property modifications) causing some to fall on one frame and some to |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 793 | 798 |
| 794 void SingleThreadProxy::DidBeginImplFrameDeadline() { | 799 void SingleThreadProxy::DidBeginImplFrameDeadline() { |
| 795 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); | 800 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); |
| 796 } | 801 } |
| 797 | 802 |
| 798 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { | 803 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { |
| 799 layer_tree_host_->SendBeginFramesToChildren(args); | 804 layer_tree_host_->SendBeginFramesToChildren(args); |
| 800 } | 805 } |
| 801 | 806 |
| 802 } // namespace cc | 807 } // namespace cc |
| OLD | NEW |