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/thread_proxy.h" | 5 #include "cc/trees/thread_proxy.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "cc/base/thread.h" | 10 #include "cc/base/thread.h" |
(...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1074 InputHandler* handler) { | 1074 InputHandler* handler) { |
1075 TRACE_EVENT0("cc", "ThreadProxy::InitializeImplOnImplThread"); | 1075 TRACE_EVENT0("cc", "ThreadProxy::InitializeImplOnImplThread"); |
1076 DCHECK(IsImplThread()); | 1076 DCHECK(IsImplThread()); |
1077 layer_tree_host_impl_ = layer_tree_host_->CreateLayerTreeHostImpl(this); | 1077 layer_tree_host_impl_ = layer_tree_host_->CreateLayerTreeHostImpl(this); |
1078 const base::TimeDelta displayRefreshInterval = | 1078 const base::TimeDelta displayRefreshInterval = |
1079 base::TimeDelta::FromMicroseconds(base::Time::kMicrosecondsPerSecond / | 1079 base::TimeDelta::FromMicroseconds(base::Time::kMicrosecondsPerSecond / |
1080 60); | 1080 60); |
1081 scoped_ptr<FrameRateController> frame_rate_controller; | 1081 scoped_ptr<FrameRateController> frame_rate_controller; |
1082 if (render_vsync_enabled_) { | 1082 if (render_vsync_enabled_) { |
1083 frame_rate_controller.reset( | 1083 frame_rate_controller.reset( |
1084 new FrameRateController(DelayBasedTimeSource::create( | 1084 new FrameRateController(DelayBasedTimeSource::Create( |
1085 displayRefreshInterval, Proxy::ImplThread()))); | 1085 displayRefreshInterval, Proxy::ImplThread()))); |
1086 } else { | 1086 } else { |
1087 frame_rate_controller.reset(new FrameRateController(Proxy::ImplThread())); | 1087 frame_rate_controller.reset(new FrameRateController(Proxy::ImplThread())); |
1088 } | 1088 } |
1089 SchedulerSettings scheduler_settings; | 1089 SchedulerSettings scheduler_settings; |
1090 scheduler_settings.impl_side_painting = | 1090 scheduler_settings.impl_side_painting = |
1091 layer_tree_host_->settings().implSidePainting; | 1091 layer_tree_host_->settings().implSidePainting; |
1092 scheduler_on_impl_thread_ = Scheduler::Create(this, | 1092 scheduler_on_impl_thread_ = Scheduler::Create(this, |
1093 frame_rate_controller.Pass(), | 1093 frame_rate_controller.Pass(), |
1094 scheduler_settings); | 1094 scheduler_settings); |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1333 base::Bind(&ThreadProxy::StartScrollbarAnimationOnImplThread, | 1333 base::Bind(&ThreadProxy::StartScrollbarAnimationOnImplThread, |
1334 impl_thread_weak_ptr_), | 1334 impl_thread_weak_ptr_), |
1335 delay); | 1335 delay); |
1336 } | 1336 } |
1337 | 1337 |
1338 void ThreadProxy::StartScrollbarAnimationOnImplThread() { | 1338 void ThreadProxy::StartScrollbarAnimationOnImplThread() { |
1339 layer_tree_host_impl_->StartScrollbarAnimation(base::TimeTicks::Now()); | 1339 layer_tree_host_impl_->StartScrollbarAnimation(base::TimeTicks::Now()); |
1340 } | 1340 } |
1341 | 1341 |
1342 } // namespace cc | 1342 } // namespace cc |
OLD | NEW |