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

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

Issue 13674006: cc: Use refresh_rate from LayerTreeSettings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Speed up all the tests. Created 7 years, 8 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
« no previous file with comments | « cc/trees/layer_tree_settings.cc ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after
1049 else if (result == LayerTreeHost::RecreateSucceeded) 1049 else if (result == LayerTreeHost::RecreateSucceeded)
1050 output_surface_recreation_callback_.Cancel(); 1050 output_surface_recreation_callback_.Cancel();
1051 } 1051 }
1052 1052
1053 void ThreadProxy::InitializeImplOnImplThread(CompletionEvent* completion, 1053 void ThreadProxy::InitializeImplOnImplThread(CompletionEvent* completion,
1054 InputHandler* handler) { 1054 InputHandler* handler) {
1055 TRACE_EVENT0("cc", "ThreadProxy::InitializeImplOnImplThread"); 1055 TRACE_EVENT0("cc", "ThreadProxy::InitializeImplOnImplThread");
1056 DCHECK(IsImplThread()); 1056 DCHECK(IsImplThread());
1057 layer_tree_host_impl_ = layer_tree_host_->CreateLayerTreeHostImpl(this); 1057 layer_tree_host_impl_ = layer_tree_host_->CreateLayerTreeHostImpl(this);
1058 const base::TimeDelta display_refresh_interval = 1058 const base::TimeDelta display_refresh_interval =
1059 base::TimeDelta::FromMicroseconds(base::Time::kMicrosecondsPerSecond / 1059 base::TimeDelta::FromMicroseconds(
1060 60); 1060 base::Time::kMicrosecondsPerSecond /
1061 layer_tree_host_->settings().refresh_rate);
1061 scoped_ptr<FrameRateController> frame_rate_controller; 1062 scoped_ptr<FrameRateController> frame_rate_controller;
1062 if (render_vsync_enabled_) { 1063 if (render_vsync_enabled_) {
1063 if (render_vsync_notification_enabled_) { 1064 if (render_vsync_notification_enabled_) {
1064 frame_rate_controller.reset( 1065 frame_rate_controller.reset(
1065 new FrameRateController(VSyncTimeSource::Create(this))); 1066 new FrameRateController(VSyncTimeSource::Create(this)));
1066 } else { 1067 } else {
1067 frame_rate_controller.reset( 1068 frame_rate_controller.reset(
1068 new FrameRateController(DelayBasedTimeSource::Create( 1069 new FrameRateController(DelayBasedTimeSource::Create(
1069 display_refresh_interval, Proxy::ImplThread()))); 1070 display_refresh_interval, Proxy::ImplThread())));
1070 } 1071 }
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
1313 base::Bind(&ThreadProxy::StartScrollbarAnimationOnImplThread, 1314 base::Bind(&ThreadProxy::StartScrollbarAnimationOnImplThread,
1314 impl_thread_weak_ptr_), 1315 impl_thread_weak_ptr_),
1315 delay); 1316 delay);
1316 } 1317 }
1317 1318
1318 void ThreadProxy::StartScrollbarAnimationOnImplThread() { 1319 void ThreadProxy::StartScrollbarAnimationOnImplThread() {
1319 layer_tree_host_impl_->StartScrollbarAnimation(base::TimeTicks::Now()); 1320 layer_tree_host_impl_->StartScrollbarAnimation(base::TimeTicks::Now());
1320 } 1321 }
1321 1322
1322 } // namespace cc 1323 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_settings.cc ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698