OLD | NEW |
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 #include "cc/scheduler/scheduler.h" | 4 #include "cc/scheduler/scheduler.h" |
5 | 5 |
6 #include <string> | 6 #include <string> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 void Reset() { | 54 void Reset() { |
55 actions_.clear(); | 55 actions_.clear(); |
56 states_.clear(); | 56 states_.clear(); |
57 draw_will_happen_ = true; | 57 draw_will_happen_ = true; |
58 swap_will_happen_if_draw_happens_ = true; | 58 swap_will_happen_if_draw_happens_ = true; |
59 num_draws_ = 0; | 59 num_draws_ = 0; |
60 log_anticipated_draw_time_change_ = false; | 60 log_anticipated_draw_time_change_ = false; |
61 } | 61 } |
62 | 62 |
63 Scheduler* CreateScheduler(const SchedulerSettings& settings) { | 63 Scheduler* CreateScheduler(const SchedulerSettings& settings) { |
64 scheduler_ = Scheduler::Create(this, settings); | 64 scheduler_ = Scheduler::Create(this, settings, 0); |
65 return scheduler_.get(); | 65 return scheduler_.get(); |
66 } | 66 } |
67 | 67 |
68 // Most tests don't care about DidAnticipatedDrawTimeChange, so only record it | 68 // Most tests don't care about DidAnticipatedDrawTimeChange, so only record it |
69 // for tests that do. | 69 // for tests that do. |
70 void set_log_anticipated_draw_time_change(bool log) { | 70 void set_log_anticipated_draw_time_change(bool log) { |
71 log_anticipated_draw_time_change_ = log; | 71 log_anticipated_draw_time_change_ = log; |
72 } | 72 } |
73 bool needs_begin_impl_frame() { return needs_begin_impl_frame_; } | 73 bool needs_begin_impl_frame() { return needs_begin_impl_frame_; } |
74 int num_draws() const { return num_draws_; } | 74 int num_draws() const { return num_draws_; } |
(...skipping 1202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1277 SpinForMillis(interval * 2); | 1277 SpinForMillis(interval * 2); |
1278 EXPECT_GT(client.num_actions_(), actions_so_far); | 1278 EXPECT_GT(client.num_actions_(), actions_so_far); |
1279 EXPECT_STREQ(client.Action(client.num_actions_() - 1), | 1279 EXPECT_STREQ(client.Action(client.num_actions_() - 1), |
1280 "DidAnticipatedDrawTimeChange"); | 1280 "DidAnticipatedDrawTimeChange"); |
1281 actions_so_far = client.num_actions_(); | 1281 actions_so_far = client.num_actions_(); |
1282 } | 1282 } |
1283 } | 1283 } |
1284 | 1284 |
1285 } // namespace | 1285 } // namespace |
1286 } // namespace cc | 1286 } // namespace cc |
OLD | NEW |