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

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

Issue 1165853002: Pipe impl_latency_takes_priority_ to the RenderScheduler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test Created 5 years, 6 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') | components/scheduler/renderer/renderer_scheduler_impl.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 <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 2985 matching lines...) Expand 10 before | Expand all | Expand 10 after
2996 scheduler_->SetAuthoritativeVSyncInterval(authoritative_interval); 2996 scheduler_->SetAuthoritativeVSyncInterval(authoritative_interval);
2997 2997
2998 EXPECT_SCOPED(AdvanceFrame()); 2998 EXPECT_SCOPED(AdvanceFrame());
2999 2999
3000 // At the next BeginFrame, authoritative interval is used instead of previous 3000 // At the next BeginFrame, authoritative interval is used instead of previous
3001 // interval. 3001 // interval.
3002 EXPECT_NE(initial_interval, scheduler_->BeginImplFrameInterval()); 3002 EXPECT_NE(initial_interval, scheduler_->BeginImplFrameInterval());
3003 EXPECT_EQ(authoritative_interval, scheduler_->BeginImplFrameInterval()); 3003 EXPECT_EQ(authoritative_interval, scheduler_->BeginImplFrameInterval());
3004 } 3004 }
3005 3005
3006 TEST_F(SchedulerTest, ImplLatencyTakesPriority) {
3007 SetUpScheduler(true);
3008 scheduler_->SetImplLatencyTakesPriority(true);
3009 EXPECT_TRUE(scheduler_->ImplLatencyTakesPriority());
3010
3011 scheduler_->SetImplLatencyTakesPriority(false);
3012 EXPECT_FALSE(scheduler_->ImplLatencyTakesPriority());
3013 }
3014
3015 TEST_F(SchedulerTest, BeginFrameArgs_OnCriticalPath) {
3016 scheduler_settings_.use_external_begin_frame_source = true;
3017 SetUpScheduler(true);
3018
3019 scheduler_->SetImplLatencyTakesPriority(false);
3020 scheduler_->SetChildrenNeedBeginFrames(true);
3021
3022 EXPECT_SCOPED(AdvanceFrame());
3023 EXPECT_TRUE(client_->begin_frame_is_sent_to_children());
3024 EXPECT_TRUE(client_->begin_frame_args_sent_to_children().on_critical_path);
3025 }
3026
3027 TEST_F(SchedulerTest, BeginFrameArgs_NotOnCriticalPath) {
3028 scheduler_settings_.use_external_begin_frame_source = true;
3029 SetUpScheduler(true);
3030
3031 scheduler_->SetImplLatencyTakesPriority(true);
3032 scheduler_->SetChildrenNeedBeginFrames(true);
3033
3034 EXPECT_SCOPED(AdvanceFrame());
3035 EXPECT_TRUE(client_->begin_frame_is_sent_to_children());
3036 EXPECT_FALSE(client_->begin_frame_args_sent_to_children().on_critical_path);
3037 }
3038
3006 } // namespace 3039 } // namespace
3007 } // namespace cc 3040 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler.cc ('k') | components/scheduler/renderer/renderer_scheduler_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698