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