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

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

Issue 13577005: cc: Prevent checkerboarded animations from timing out during tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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') | no next file » | 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 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after
1088 frame_rate_controller.reset( 1088 frame_rate_controller.reset(
1089 new FrameRateController(VSyncTimeSource::Create(this))); 1089 new FrameRateController(VSyncTimeSource::Create(this)));
1090 } else { 1090 } else {
1091 frame_rate_controller.reset( 1091 frame_rate_controller.reset(
1092 new FrameRateController(DelayBasedTimeSource::Create( 1092 new FrameRateController(DelayBasedTimeSource::Create(
1093 display_refresh_interval, Proxy::ImplThread()))); 1093 display_refresh_interval, Proxy::ImplThread())));
1094 } 1094 }
1095 } else { 1095 } else {
1096 frame_rate_controller.reset(new FrameRateController(Proxy::ImplThread())); 1096 frame_rate_controller.reset(new FrameRateController(Proxy::ImplThread()));
1097 } 1097 }
1098 const LayerTreeSettings& settings = layer_tree_host_->settings();
1098 SchedulerSettings scheduler_settings; 1099 SchedulerSettings scheduler_settings;
1099 scheduler_settings.impl_side_painting = 1100 scheduler_settings.impl_side_painting = settings.impl_side_painting;
1100 layer_tree_host_->settings().impl_side_painting; 1101 scheduler_settings.timeout_and_draw_when_animation_checkerboards =
1102 settings.timeout_and_draw_when_animation_checkerboards;
1101 scheduler_on_impl_thread_ = Scheduler::Create(this, 1103 scheduler_on_impl_thread_ = Scheduler::Create(this,
1102 frame_rate_controller.Pass(), 1104 frame_rate_controller.Pass(),
1103 scheduler_settings); 1105 scheduler_settings);
1104 scheduler_on_impl_thread_->SetVisible(layer_tree_host_impl_->visible()); 1106 scheduler_on_impl_thread_->SetVisible(layer_tree_host_impl_->visible());
1105 1107
1106 input_handler_on_impl_thread_ = scoped_ptr<InputHandler>(handler); 1108 input_handler_on_impl_thread_ = scoped_ptr<InputHandler>(handler);
1107 if (input_handler_on_impl_thread_) 1109 if (input_handler_on_impl_thread_)
1108 input_handler_on_impl_thread_->BindToClient(layer_tree_host_impl_.get()); 1110 input_handler_on_impl_thread_->BindToClient(layer_tree_host_impl_.get());
1109 1111
1110 impl_thread_weak_ptr_ = weak_factory_on_impl_thread_.GetWeakPtr(); 1112 impl_thread_weak_ptr_ = weak_factory_on_impl_thread_.GetWeakPtr();
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
1337 base::Bind(&ThreadProxy::StartScrollbarAnimationOnImplThread, 1339 base::Bind(&ThreadProxy::StartScrollbarAnimationOnImplThread,
1338 impl_thread_weak_ptr_), 1340 impl_thread_weak_ptr_),
1339 delay); 1341 delay);
1340 } 1342 }
1341 1343
1342 void ThreadProxy::StartScrollbarAnimationOnImplThread() { 1344 void ThreadProxy::StartScrollbarAnimationOnImplThread() {
1343 layer_tree_host_impl_->StartScrollbarAnimation(base::TimeTicks::Now()); 1345 layer_tree_host_impl_->StartScrollbarAnimation(base::TimeTicks::Now());
1344 } 1346 }
1345 1347
1346 } // namespace cc 1348 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_settings.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698