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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 | 83 |
84 void SingleThreadProxy::SetLayerTreeHostClientReady() { | 84 void SingleThreadProxy::SetLayerTreeHostClientReady() { |
85 TRACE_EVENT0("cc", "SingleThreadProxy::SetLayerTreeHostClientReady"); | 85 TRACE_EVENT0("cc", "SingleThreadProxy::SetLayerTreeHostClientReady"); |
86 // Scheduling is controlled by the embedder in the single thread case, so | 86 // Scheduling is controlled by the embedder in the single thread case, so |
87 // nothing to do. | 87 // nothing to do. |
88 DCHECK(Proxy::IsMainThread()); | 88 DCHECK(Proxy::IsMainThread()); |
89 DebugScopedSetImplThread impl(this); | 89 DebugScopedSetImplThread impl(this); |
90 if (layer_tree_host_->settings().single_thread_proxy_scheduler && | 90 if (layer_tree_host_->settings().single_thread_proxy_scheduler && |
91 !scheduler_on_impl_thread_) { | 91 !scheduler_on_impl_thread_) { |
92 SchedulerSettings scheduler_settings(layer_tree_host_->settings()); | 92 SchedulerSettings scheduler_settings(layer_tree_host_->settings()); |
| 93 scheduler_settings.main_thread_should_always_be_low_latency = true; |
93 scheduler_on_impl_thread_ = | 94 scheduler_on_impl_thread_ = |
94 Scheduler::Create(this, | 95 Scheduler::Create(this, |
95 scheduler_settings, | 96 scheduler_settings, |
96 layer_tree_host_->id(), | 97 layer_tree_host_->id(), |
97 MainThreadTaskRunner(), | 98 MainThreadTaskRunner(), |
98 base::PowerMonitor::Get(), | 99 base::PowerMonitor::Get(), |
99 external_begin_frame_source_.Pass()); | 100 external_begin_frame_source_.Pass()); |
100 scheduler_on_impl_thread_->SetCanStart(); | 101 scheduler_on_impl_thread_->SetCanStart(); |
101 scheduler_on_impl_thread_->SetVisible(layer_tree_host_impl_->visible()); | 102 scheduler_on_impl_thread_->SetVisible(layer_tree_host_impl_->visible()); |
102 } | 103 } |
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 | 795 |
795 void SingleThreadProxy::DidBeginImplFrameDeadline() { | 796 void SingleThreadProxy::DidBeginImplFrameDeadline() { |
796 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); | 797 layer_tree_host_impl_->ResetCurrentBeginFrameArgsForNextFrame(); |
797 } | 798 } |
798 | 799 |
799 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { | 800 void SingleThreadProxy::SendBeginFramesToChildren(const BeginFrameArgs& args) { |
800 layer_tree_host_->SendBeginFramesToChildren(args); | 801 layer_tree_host_->SendBeginFramesToChildren(args); |
801 } | 802 } |
802 | 803 |
803 } // namespace cc | 804 } // namespace cc |
OLD | NEW |