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 | 10 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 } | 93 } |
94 | 94 |
95 int Scheduler::MaxFramesPending() const { | 95 int Scheduler::MaxFramesPending() const { |
96 return frame_rate_controller_->MaxFramesPending(); | 96 return frame_rate_controller_->MaxFramesPending(); |
97 } | 97 } |
98 | 98 |
99 int Scheduler::NumFramesPendingForTesting() const { | 99 int Scheduler::NumFramesPendingForTesting() const { |
100 return frame_rate_controller_->NumFramesPendingForTesting(); | 100 return frame_rate_controller_->NumFramesPendingForTesting(); |
101 } | 101 } |
102 | 102 |
| 103 bool Scheduler::swap_buffers_complete_supported() const { |
| 104 return frame_rate_controller_->swap_buffers_complete_supported(); |
| 105 } |
| 106 |
103 void Scheduler::SetSwapBuffersCompleteSupported(bool supported) { | 107 void Scheduler::SetSwapBuffersCompleteSupported(bool supported) { |
104 frame_rate_controller_->SetSwapBuffersCompleteSupported(supported); | 108 frame_rate_controller_->SetSwapBuffersCompleteSupported(supported); |
105 } | 109 } |
106 | 110 |
107 void Scheduler::DidSwapBuffersComplete() { | 111 void Scheduler::DidSwapBuffersComplete() { |
108 TRACE_EVENT0("cc", "Scheduler::DidSwapBuffersComplete"); | 112 TRACE_EVENT0("cc", "Scheduler::DidSwapBuffersComplete"); |
109 frame_rate_controller_->DidSwapBuffersComplete(); | 113 frame_rate_controller_->DidSwapBuffersComplete(); |
110 } | 114 } |
111 | 115 |
112 void Scheduler::DidLoseOutputSurface() { | 116 void Scheduler::DidLoseOutputSurface() { |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 frame_rate_controller_->SetActive( | 206 frame_rate_controller_->SetActive( |
203 state_machine_.BeginFrameNeededByImplThread()); | 207 state_machine_.BeginFrameNeededByImplThread()); |
204 client_->DidAnticipatedDrawTimeChange(frame_rate_controller_->NextTickTime()); | 208 client_->DidAnticipatedDrawTimeChange(frame_rate_controller_->NextTickTime()); |
205 } | 209 } |
206 | 210 |
207 bool Scheduler::WillDrawIfNeeded() const { | 211 bool Scheduler::WillDrawIfNeeded() const { |
208 return !state_machine_.DrawSuspendedUntilCommit(); | 212 return !state_machine_.DrawSuspendedUntilCommit(); |
209 } | 213 } |
210 | 214 |
211 } // namespace cc | 215 } // namespace cc |
OLD | NEW |