| 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 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 746 bool SingleThreadProxy::MainFrameWillHappenForTesting() { | 746 bool SingleThreadProxy::MainFrameWillHappenForTesting() { |
| 747 return false; | 747 return false; |
| 748 } | 748 } |
| 749 | 749 |
| 750 void SingleThreadProxy::SetChildrenNeedBeginFrames( | 750 void SingleThreadProxy::SetChildrenNeedBeginFrames( |
| 751 bool children_need_begin_frames) { | 751 bool children_need_begin_frames) { |
| 752 scheduler_on_impl_thread_->SetChildrenNeedBeginFrames( | 752 scheduler_on_impl_thread_->SetChildrenNeedBeginFrames( |
| 753 children_need_begin_frames); | 753 children_need_begin_frames); |
| 754 } | 754 } |
| 755 | 755 |
| 756 void SingleThreadProxy::SetAuthoritativeVSyncInterval( |
| 757 const base::TimeDelta& interval) { |
| 758 scheduler_on_impl_thread_->SetAuthoritativeVSyncInterval(interval); |
| 759 } |
| 760 |
| 756 void SingleThreadProxy::WillBeginImplFrame(const BeginFrameArgs& args) { | 761 void SingleThreadProxy::WillBeginImplFrame(const BeginFrameArgs& args) { |
| 757 layer_tree_host_impl_->WillBeginImplFrame(args); | 762 layer_tree_host_impl_->WillBeginImplFrame(args); |
| 758 } | 763 } |
| 759 | 764 |
| 760 void SingleThreadProxy::ScheduledActionSendBeginMainFrame() { | 765 void SingleThreadProxy::ScheduledActionSendBeginMainFrame() { |
| 761 TRACE_EVENT0("cc", "SingleThreadProxy::ScheduledActionSendBeginMainFrame"); | 766 TRACE_EVENT0("cc", "SingleThreadProxy::ScheduledActionSendBeginMainFrame"); |
| 762 // Although this proxy is single-threaded, it's problematic to synchronously | 767 // Although this proxy is single-threaded, it's problematic to synchronously |
| 763 // have BeginMainFrame happen after ScheduledActionSendBeginMainFrame. This | 768 // have BeginMainFrame happen after ScheduledActionSendBeginMainFrame. This |
| 764 // could cause a commit to occur in between a series of SetNeedsCommit calls | 769 // could cause a commit to occur in between a series of SetNeedsCommit calls |
| 765 // (i.e. property modifications) causing some to fall on one frame and some to | 770 // (i.e. property modifications) causing some to fall on one frame and some to |
| (...skipping 151 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 |