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

Side by Side Diff: cc/test/scheduler_test_common.h

Issue 2632563003: [cc] Calculate the correct latest_confirmed_sequence_number in cc::Scheduler. (Closed)
Patch Set: handle BeginFrameDropped and add test for it. Created 3 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
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 #ifndef CC_TEST_SCHEDULER_TEST_COMMON_H_ 5 #ifndef CC_TEST_SCHEDULER_TEST_COMMON_H_
6 #define CC_TEST_SCHEDULER_TEST_COMMON_H_ 6 #define CC_TEST_SCHEDULER_TEST_COMMON_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 BeginFrameSource& frame_source() { return *begin_frame_source_; } 137 BeginFrameSource& frame_source() { return *begin_frame_source_; }
138 138
139 bool MainThreadMissedLastDeadline() const { 139 bool MainThreadMissedLastDeadline() const {
140 return state_machine_.main_thread_missed_last_deadline(); 140 return state_machine_.main_thread_missed_last_deadline();
141 } 141 }
142 142
143 bool begin_frames_expected() const { 143 bool begin_frames_expected() const {
144 return begin_frame_source_ && observing_begin_frame_source_; 144 return begin_frame_source_ && observing_begin_frame_source_;
145 } 145 }
146 146
147 bool StateMachineNeedsBeginFrames() const {
brianderson 2017/02/23 20:20:36 Remove the StateMachine prefix to be consistent wi
Eric Seckler 2017/02/24 15:35:31 Done.
148 return state_machine_.BeginFrameNeeded();
149 }
150
147 int current_frame_number() const { 151 int current_frame_number() const {
148 return state_machine_.current_frame_number(); 152 return state_machine_.current_frame_number();
149 } 153 }
150 154
151 ~TestScheduler() override; 155 ~TestScheduler() override;
152 156
153 base::TimeDelta BeginImplFrameInterval() { 157 base::TimeDelta BeginImplFrameInterval() {
154 return begin_impl_frame_tracker_.Interval(); 158 return begin_impl_frame_tracker_.Interval();
155 } 159 }
156 160
(...skipping 11 matching lines...) Expand all
168 172
169 private: 173 private:
170 base::SimpleTestTickClock* now_src_; 174 base::SimpleTestTickClock* now_src_;
171 175
172 DISALLOW_COPY_AND_ASSIGN(TestScheduler); 176 DISALLOW_COPY_AND_ASSIGN(TestScheduler);
173 }; 177 };
174 178
175 } // namespace cc 179 } // namespace cc
176 180
177 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_ 181 #endif // CC_TEST_SCHEDULER_TEST_COMMON_H_
OLDNEW
« cc/scheduler/scheduler.cc ('K') | « cc/test/fake_external_begin_frame_source.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698