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

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

Issue 2712983003: [cc] Set BeginFrame sequence numbers on CompositorFrames from Scheduler. (Closed)
Patch Set: fix comment + test. Created 3 years, 9 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.h ('k') | cc/test/begin_frame_source_test.cc » ('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_state_machine.h" 5 #include "cc/scheduler/scheduler_state_machine.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 #include "cc/output/begin_frame_args.h" 10 #include "cc/output/begin_frame_args.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 174
175 uint64_t begin_frame_sequence_number() const { 175 uint64_t begin_frame_sequence_number() const {
176 return begin_frame_sequence_number_; 176 return begin_frame_sequence_number_;
177 } 177 }
178 uint64_t last_begin_frame_sequence_number_begin_main_frame_sent() const { 178 uint64_t last_begin_frame_sequence_number_begin_main_frame_sent() const {
179 return last_begin_frame_sequence_number_begin_main_frame_sent_; 179 return last_begin_frame_sequence_number_begin_main_frame_sent_;
180 } 180 }
181 uint64_t last_begin_frame_sequence_number_pending_tree_was_fresh() const { 181 uint64_t last_begin_frame_sequence_number_pending_tree_was_fresh() const {
182 return last_begin_frame_sequence_number_pending_tree_was_fresh_; 182 return last_begin_frame_sequence_number_pending_tree_was_fresh_;
183 } 183 }
184 uint64_t last_begin_frame_sequence_number_active_tree_was_fresh() const {
185 return last_begin_frame_sequence_number_active_tree_was_fresh_;
186 }
187 184
188 using SchedulerStateMachine::ShouldTriggerBeginImplFrameDeadlineImmediately; 185 using SchedulerStateMachine::ShouldTriggerBeginImplFrameDeadlineImmediately;
189 using SchedulerStateMachine::ProactiveBeginFrameWanted; 186 using SchedulerStateMachine::ProactiveBeginFrameWanted;
190 using SchedulerStateMachine::WillCommit; 187 using SchedulerStateMachine::WillCommit;
191 188
192 protected: 189 protected:
193 DrawResult draw_result_for_test_; 190 DrawResult draw_result_for_test_;
194 uint64_t next_begin_frame_number_ = BeginFrameArgs::kStartingFrameNumber; 191 uint64_t next_begin_frame_number_ = BeginFrameArgs::kStartingFrameNumber;
195 }; 192 };
196 193
(...skipping 2533 matching lines...) Expand 10 before | Expand all | Expand 10 after
2730 state.OnBeginImplFrameDeadline(); 2727 state.OnBeginImplFrameDeadline();
2731 EXPECT_ACTION_UPDATE_STATE(SchedulerStateMachine::ACTION_NONE); 2728 EXPECT_ACTION_UPDATE_STATE(SchedulerStateMachine::ACTION_NONE);
2732 EXPECT_SEQUENCE_NUMBERS(10u, 10u, 10u, BeginFrameArgs::kInvalidFrameNumber, 2729 EXPECT_SEQUENCE_NUMBERS(10u, 10u, 10u, BeginFrameArgs::kInvalidFrameNumber,
2733 BeginFrameArgs::kInvalidFrameNumber); 2730 BeginFrameArgs::kInvalidFrameNumber);
2734 state.OnBeginImplFrameIdle(); 2731 state.OnBeginImplFrameIdle();
2735 EXPECT_ACTION_UPDATE_STATE(SchedulerStateMachine::ACTION_NONE); 2732 EXPECT_ACTION_UPDATE_STATE(SchedulerStateMachine::ACTION_NONE);
2736 } 2733 }
2737 2734
2738 } // namespace 2735 } // namespace
2739 } // namespace cc 2736 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler_state_machine.h ('k') | cc/test/begin_frame_source_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698