Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(663)

Side by Side Diff: cc/trees/thread_proxy.cc

Issue 12623026: cc: Chromify TimeSource, DelayBasedTimeSource and test (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 InputHandler* handler) { 1073 InputHandler* handler) {
1074 TRACE_EVENT0("cc", "ThreadProxy::InitializeImplOnImplThread"); 1074 TRACE_EVENT0("cc", "ThreadProxy::InitializeImplOnImplThread");
1075 DCHECK(IsImplThread()); 1075 DCHECK(IsImplThread());
1076 layer_tree_host_impl_ = layer_tree_host_->CreateLayerTreeHostImpl(this); 1076 layer_tree_host_impl_ = layer_tree_host_->CreateLayerTreeHostImpl(this);
1077 const base::TimeDelta displayRefreshInterval = 1077 const base::TimeDelta displayRefreshInterval =
1078 base::TimeDelta::FromMicroseconds(base::Time::kMicrosecondsPerSecond / 1078 base::TimeDelta::FromMicroseconds(base::Time::kMicrosecondsPerSecond /
1079 60); 1079 60);
1080 scoped_ptr<FrameRateController> frame_rate_controller; 1080 scoped_ptr<FrameRateController> frame_rate_controller;
1081 if (render_vsync_enabled_) { 1081 if (render_vsync_enabled_) {
1082 frame_rate_controller.reset( 1082 frame_rate_controller.reset(
1083 new FrameRateController(DelayBasedTimeSource::create( 1083 new FrameRateController(DelayBasedTimeSource::Create(
1084 displayRefreshInterval, Proxy::ImplThread()))); 1084 displayRefreshInterval, Proxy::ImplThread())));
1085 } else { 1085 } else {
1086 frame_rate_controller.reset(new FrameRateController(Proxy::ImplThread())); 1086 frame_rate_controller.reset(new FrameRateController(Proxy::ImplThread()));
1087 } 1087 }
1088 SchedulerSettings scheduler_settings; 1088 SchedulerSettings scheduler_settings;
1089 scheduler_settings.impl_side_painting = 1089 scheduler_settings.impl_side_painting =
1090 layer_tree_host_->settings().implSidePainting; 1090 layer_tree_host_->settings().implSidePainting;
1091 scheduler_on_impl_thread_ = Scheduler::Create(this, 1091 scheduler_on_impl_thread_ = Scheduler::Create(this,
1092 frame_rate_controller.Pass(), 1092 frame_rate_controller.Pass(),
1093 scheduler_settings); 1093 scheduler_settings);
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
1332 base::Bind(&ThreadProxy::StartScrollbarAnimationOnImplThread, 1332 base::Bind(&ThreadProxy::StartScrollbarAnimationOnImplThread,
1333 impl_thread_weak_ptr_), 1333 impl_thread_weak_ptr_),
1334 delay); 1334 delay);
1335 } 1335 }
1336 1336
1337 void ThreadProxy::StartScrollbarAnimationOnImplThread() { 1337 void ThreadProxy::StartScrollbarAnimationOnImplThread() {
1338 layer_tree_host_impl_->StartScrollbarAnimation(base::TimeTicks::Now()); 1338 layer_tree_host_impl_->StartScrollbarAnimation(base::TimeTicks::Now());
1339 } 1339 }
1340 1340
1341 } // namespace cc 1341 } // namespace cc
OLDNEW
« cc/scheduler/delay_based_time_source.cc ('K') | « cc/trees/layer_tree_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698