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

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

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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/surfaces/surface_display_output_surface.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.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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 } 182 }
183 183
184 bool draw_will_happen_; 184 bool draw_will_happen_;
185 bool swap_will_happen_if_draw_happens_; 185 bool swap_will_happen_if_draw_happens_;
186 bool automatic_swap_ack_; 186 bool automatic_swap_ack_;
187 int num_draws_; 187 int num_draws_;
188 bool log_anticipated_draw_time_change_; 188 bool log_anticipated_draw_time_change_;
189 bool begin_frame_is_sent_to_children_; 189 bool begin_frame_is_sent_to_children_;
190 base::TimeTicks posted_begin_impl_frame_deadline_; 190 base::TimeTicks posted_begin_impl_frame_deadline_;
191 std::vector<const char*> actions_; 191 std::vector<const char*> actions_;
192 std::vector<scoped_refptr<base::debug::ConvertableToTraceFormat>> states_; 192 std::vector<scoped_refptr<base::trace_event::ConvertableToTraceFormat>>
193 states_;
193 TestScheduler* scheduler_; 194 TestScheduler* scheduler_;
194 }; 195 };
195 196
196 class FakePowerMonitorSource : public base::PowerMonitorSource { 197 class FakePowerMonitorSource : public base::PowerMonitorSource {
197 public: 198 public:
198 FakePowerMonitorSource() {} 199 FakePowerMonitorSource() {}
199 ~FakePowerMonitorSource() override {} 200 ~FakePowerMonitorSource() override {}
200 void GeneratePowerStateEvent(bool on_battery_power) { 201 void GeneratePowerStateEvent(bool on_battery_power) {
201 on_battery_power_impl_ = on_battery_power; 202 on_battery_power_impl_ = on_battery_power;
202 ProcessPowerEvent(POWER_STATE_EVENT); 203 ProcessPowerEvent(POWER_STATE_EVENT);
(...skipping 2138 matching lines...) Expand 10 before | Expand all | Expand 10 after
2341 EXPECT_ACTION("ScheduledActionAnimate", client_, 1, 2); 2342 EXPECT_ACTION("ScheduledActionAnimate", client_, 1, 2);
2342 EXPECT_TRUE(scheduler_->BeginImplFrameDeadlinePending()); 2343 EXPECT_TRUE(scheduler_->BeginImplFrameDeadlinePending());
2343 EXPECT_TRUE(client_->needs_begin_frames()); 2344 EXPECT_TRUE(client_->needs_begin_frames());
2344 client_->Reset(); 2345 client_->Reset();
2345 task_runner().RunPendingTasks(); // Run posted deadline. 2346 task_runner().RunPendingTasks(); // Run posted deadline.
2346 EXPECT_ACTION("ScheduledActionDrawAndSwapIfPossible", client_, 0, 1); 2347 EXPECT_ACTION("ScheduledActionDrawAndSwapIfPossible", client_, 0, 1);
2347 } 2348 }
2348 2349
2349 } // namespace 2350 } // namespace
2350 } // namespace cc 2351 } // namespace cc
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler_state_machine.cc ('k') | cc/surfaces/surface_display_output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698