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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 state_machine_.SetMainThreadNeedsLayerTextures(); | 78 state_machine_.SetMainThreadNeedsLayerTextures(); |
79 ProcessScheduledActions(); | 79 ProcessScheduledActions(); |
80 } | 80 } |
81 | 81 |
82 void Scheduler::FinishCommit() { | 82 void Scheduler::FinishCommit() { |
83 TRACE_EVENT0("cc", "Scheduler::FinishCommit"); | 83 TRACE_EVENT0("cc", "Scheduler::FinishCommit"); |
84 state_machine_.FinishCommit(); | 84 state_machine_.FinishCommit(); |
85 ProcessScheduledActions(); | 85 ProcessScheduledActions(); |
86 } | 86 } |
87 | 87 |
88 void Scheduler::BeginFrameAbortedByMainThread() { | 88 void Scheduler::BeginFrameAbortedByMainThread(bool cancel_commit) { |
89 TRACE_EVENT0("cc", "Scheduler::BeginFrameAbortedByMainThread"); | 89 TRACE_EVENT0("cc", "Scheduler::BeginFrameAbortedByMainThread"); |
90 state_machine_.BeginFrameAbortedByMainThread(); | 90 state_machine_.BeginFrameAbortedByMainThread(cancel_commit); |
91 ProcessScheduledActions(); | 91 ProcessScheduledActions(); |
92 } | 92 } |
93 | 93 |
94 void Scheduler::DidLoseOutputSurface() { | 94 void Scheduler::DidLoseOutputSurface() { |
95 TRACE_EVENT0("cc", "Scheduler::DidLoseOutputSurface"); | 95 TRACE_EVENT0("cc", "Scheduler::DidLoseOutputSurface"); |
96 state_machine_.DidLoseOutputSurface(); | 96 state_machine_.DidLoseOutputSurface(); |
97 ProcessScheduledActions(); | 97 ProcessScheduledActions(); |
98 } | 98 } |
99 | 99 |
100 void Scheduler::DidCreateAndInitializeOutputSurface() { | 100 void Scheduler::DidCreateAndInitializeOutputSurface() { |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 | 235 |
236 SetupNextBeginFrameIfNeeded(); | 236 SetupNextBeginFrameIfNeeded(); |
237 client_->DidAnticipatedDrawTimeChange(AnticipatedDrawTime()); | 237 client_->DidAnticipatedDrawTimeChange(AnticipatedDrawTime()); |
238 } | 238 } |
239 | 239 |
240 bool Scheduler::WillDrawIfNeeded() const { | 240 bool Scheduler::WillDrawIfNeeded() const { |
241 return !state_machine_.DrawSuspendedUntilCommit(); | 241 return !state_machine_.DrawSuspendedUntilCommit(); |
242 } | 242 } |
243 | 243 |
244 } // namespace cc | 244 } // namespace cc |
OLD | NEW |