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/trace_event/trace_event.h" | 8 #include "base/trace_event/trace_event.h" |
9 #include "cc/debug/benchmark_instrumentation.h" | 9 #include "cc/debug/benchmark_instrumentation.h" |
10 #include "cc/debug/devtools_instrumentation.h" | 10 #include "cc/debug/devtools_instrumentation.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 if (layer_tree_host_->settings().single_thread_proxy_scheduler && | 97 if (layer_tree_host_->settings().single_thread_proxy_scheduler && |
98 !scheduler_on_impl_thread_) { | 98 !scheduler_on_impl_thread_) { |
99 SchedulerSettings scheduler_settings(layer_tree_host_->settings()); | 99 SchedulerSettings scheduler_settings(layer_tree_host_->settings()); |
100 // SingleThreadProxy should run in main thread low latency mode. | 100 // SingleThreadProxy should run in main thread low latency mode. |
101 scheduler_settings.main_thread_should_always_be_low_latency = true; | 101 scheduler_settings.main_thread_should_always_be_low_latency = true; |
102 scheduler_on_impl_thread_ = | 102 scheduler_on_impl_thread_ = |
103 Scheduler::Create(this, | 103 Scheduler::Create(this, |
104 scheduler_settings, | 104 scheduler_settings, |
105 layer_tree_host_->id(), | 105 layer_tree_host_->id(), |
106 MainThreadTaskRunner(), | 106 MainThreadTaskRunner(), |
107 base::PowerMonitor::Get(), | |
108 external_begin_frame_source_.Pass()); | 107 external_begin_frame_source_.Pass()); |
109 scheduler_on_impl_thread_->SetCanStart(); | 108 scheduler_on_impl_thread_->SetCanStart(); |
110 scheduler_on_impl_thread_->SetVisible(layer_tree_host_impl_->visible()); | 109 scheduler_on_impl_thread_->SetVisible(layer_tree_host_impl_->visible()); |
111 } | 110 } |
112 } | 111 } |
113 | 112 |
114 void SingleThreadProxy::SetVisible(bool visible) { | 113 void SingleThreadProxy::SetVisible(bool visible) { |
115 TRACE_EVENT1("cc", "SingleThreadProxy::SetVisible", "visible", visible); | 114 TRACE_EVENT1("cc", "SingleThreadProxy::SetVisible", "visible", visible); |
116 DebugScopedSetImplThread impl(this); | 115 DebugScopedSetImplThread impl(this); |
117 layer_tree_host_impl_->SetVisible(visible); | 116 layer_tree_host_impl_->SetVisible(visible); |
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
831 | 830 |
832 void SingleThreadProxy::DidBeginImplFrameDeadline() { | 831 void SingleThreadProxy::DidBeginImplFrameDeadline() { |
833 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); | 832 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); |
834 } | 833 } |
835 | 834 |
836 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { | 835 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { |
837 layer_tree_host_->SendBeginFramesToChildren(args); | 836 layer_tree_host_->SendBeginFramesToChildren(args); |
838 } | 837 } |
839 | 838 |
840 } // namespace cc | 839 } // namespace cc |
OLD | NEW |