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

Side by Side Diff: cc/scheduler/scheduler_unittest.cc

Issue 2324273002: Remove external begin frame source parameter and settings (Closed)
Patch Set: Add back comment, remove more febfs includes Created 4 years, 3 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
« no previous file with comments | « cc/scheduler/scheduler.cc ('k') | cc/test/fake_proxy.h » ('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/scheduler/scheduler.h" 5 #include "cc/scheduler/scheduler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 frame_source = synthetic_frame_source_.get(); 260 frame_source = synthetic_frame_source_.get();
261 break; 261 break;
262 } 262 }
263 DCHECK(frame_source); 263 DCHECK(frame_source);
264 264
265 std::unique_ptr<FakeCompositorTimingHistory> 265 std::unique_ptr<FakeCompositorTimingHistory>
266 fake_compositor_timing_history = FakeCompositorTimingHistory::Create( 266 fake_compositor_timing_history = FakeCompositorTimingHistory::Create(
267 scheduler_settings_.using_synchronous_renderer_compositor); 267 scheduler_settings_.using_synchronous_renderer_compositor);
268 fake_compositor_timing_history_ = fake_compositor_timing_history.get(); 268 fake_compositor_timing_history_ = fake_compositor_timing_history.get();
269 269
270 scheduler_.reset( 270 scheduler_.reset(new TestScheduler(
271 new TestScheduler(now_src_.get(), client_.get(), scheduler_settings_, 0, 271 now_src_.get(), client_.get(), scheduler_settings_, 0,
272 task_runner_.get(), frame_source, 272 task_runner_.get(), std::move(fake_compositor_timing_history)));
273 std::move(fake_compositor_timing_history))); 273 scheduler_->SetBeginFrameSource(frame_source);
274 DCHECK(scheduler_);
275 client_->set_scheduler(scheduler_.get()); 274 client_->set_scheduler(scheduler_.get());
276 275
277 // Use large estimates by default to avoid latency recovery in most tests. 276 // Use large estimates by default to avoid latency recovery in most tests.
278 fake_compositor_timing_history_->SetAllEstimatesTo(kSlowDuration); 277 fake_compositor_timing_history_->SetAllEstimatesTo(kSlowDuration);
279 278
280 return scheduler_.get(); 279 return scheduler_.get();
281 } 280 }
282 281
283 void SetUpScheduler(BeginFrameSourceType bfs_type, 282 void SetUpScheduler(BeginFrameSourceType bfs_type,
284 std::unique_ptr<FakeSchedulerClient> client) { 283 std::unique_ptr<FakeSchedulerClient> client) {
(...skipping 3320 matching lines...) Expand 10 before | Expand all | Expand 10 after
3605 } 3604 }
3606 3605
3607 TEST_F(SchedulerTest, BeginMainFrameOnCriticalPath_AHS) { 3606 TEST_F(SchedulerTest, BeginMainFrameOnCriticalPath_AHS) {
3608 EXPECT_FALSE(BeginMainFrameOnCriticalPath( 3607 EXPECT_FALSE(BeginMainFrameOnCriticalPath(
3609 SMOOTHNESS_TAKES_PRIORITY, 3608 SMOOTHNESS_TAKES_PRIORITY,
3610 ScrollHandlerState::SCROLL_AFFECTS_SCROLL_HANDLER, kSlowDuration)); 3609 ScrollHandlerState::SCROLL_AFFECTS_SCROLL_HANDLER, kSlowDuration));
3611 } 3610 }
3612 3611
3613 } // namespace 3612 } // namespace
3614 } // namespace cc 3613 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler.cc ('k') | cc/test/fake_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698