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 | 4 |
5 #include "cc/scheduler/scheduler.h" | 5 #include "cc/scheduler/scheduler.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "cc/base/thread.h" | |
11 | 10 |
12 namespace cc { | 11 namespace cc { |
13 | 12 |
14 Scheduler::Scheduler(SchedulerClient* client, | 13 Scheduler::Scheduler(SchedulerClient* client, |
15 const SchedulerSettings& scheduler_settings) | 14 const SchedulerSettings& scheduler_settings) |
16 : settings_(scheduler_settings), | 15 : settings_(scheduler_settings), |
17 client_(client), | 16 client_(client), |
18 weak_factory_(this), | 17 weak_factory_(this), |
19 last_set_needs_begin_frame_(false), | 18 last_set_needs_begin_frame_(false), |
20 has_pending_begin_frame_(false), | 19 has_pending_begin_frame_(false), |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 | 232 |
234 SetupNextBeginFrameIfNeeded(); | 233 SetupNextBeginFrameIfNeeded(); |
235 client_->DidAnticipatedDrawTimeChange(AnticipatedDrawTime()); | 234 client_->DidAnticipatedDrawTimeChange(AnticipatedDrawTime()); |
236 } | 235 } |
237 | 236 |
238 bool Scheduler::WillDrawIfNeeded() const { | 237 bool Scheduler::WillDrawIfNeeded() const { |
239 return !state_machine_.DrawSuspendedUntilCommit(); | 238 return !state_machine_.DrawSuspendedUntilCommit(); |
240 } | 239 } |
241 | 240 |
242 } // namespace cc | 241 } // namespace cc |
OLD | NEW |