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

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

Issue 1681393003: cc: Add MainAndImplFrameTimeDelta UMA. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: - active_tree_needs_first_draw_ = true Created 4 years, 10 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_state_machine.cc ('k') | cc/test/scheduler_test_common.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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 ~SchedulerTest() override {} 256 ~SchedulerTest() override {}
257 257
258 protected: 258 protected:
259 TestScheduler* CreateScheduler() { 259 TestScheduler* CreateScheduler() {
260 if (scheduler_settings_.use_external_begin_frame_source) { 260 if (scheduler_settings_.use_external_begin_frame_source) {
261 fake_external_begin_frame_source_.reset( 261 fake_external_begin_frame_source_.reset(
262 new FakeExternalBeginFrameSource(client_.get())); 262 new FakeExternalBeginFrameSource(client_.get()));
263 } 263 }
264 264
265 scoped_ptr<FakeCompositorTimingHistory> fake_compositor_timing_history = 265 scoped_ptr<FakeCompositorTimingHistory> fake_compositor_timing_history =
266 FakeCompositorTimingHistory::Create(); 266 FakeCompositorTimingHistory::Create(
267 scheduler_settings_.using_synchronous_renderer_compositor);
267 fake_compositor_timing_history_ = fake_compositor_timing_history.get(); 268 fake_compositor_timing_history_ = fake_compositor_timing_history.get();
268 269
269 scheduler_ = TestScheduler::Create( 270 scheduler_ = TestScheduler::Create(
270 now_src_.get(), client_.get(), scheduler_settings_, 0, 271 now_src_.get(), client_.get(), scheduler_settings_, 0,
271 task_runner_.get(), fake_external_begin_frame_source_.get(), 272 task_runner_.get(), fake_external_begin_frame_source_.get(),
272 std::move(fake_compositor_timing_history)); 273 std::move(fake_compositor_timing_history));
273 DCHECK(scheduler_); 274 DCHECK(scheduler_);
274 client_->set_scheduler(scheduler_.get()); 275 client_->set_scheduler(scheduler_.get());
275 276
276 // Use large estimates by default to avoid latency recovery in most tests. 277 // Use large estimates by default to avoid latency recovery in most tests.
(...skipping 3398 matching lines...) Expand 10 before | Expand all | Expand 10 after
3675 } 3676 }
3676 3677
3677 TEST_F(SchedulerTest, BeginMainFrameOnCriticalPath_AHS) { 3678 TEST_F(SchedulerTest, BeginMainFrameOnCriticalPath_AHS) {
3678 EXPECT_FALSE(BeginMainFrameOnCriticalPath( 3679 EXPECT_FALSE(BeginMainFrameOnCriticalPath(
3679 SMOOTHNESS_TAKES_PRIORITY, 3680 SMOOTHNESS_TAKES_PRIORITY,
3680 ScrollHandlerState::SCROLL_AFFECTS_SCROLL_HANDLER, kSlowDuration)); 3681 ScrollHandlerState::SCROLL_AFFECTS_SCROLL_HANDLER, kSlowDuration));
3681 } 3682 }
3682 3683
3683 } // namespace 3684 } // namespace
3684 } // namespace cc 3685 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler_state_machine.cc ('k') | cc/test/scheduler_test_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698