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 <algorithm> | 7 #include <algorithm> |
8 #include "base/auto_reset.h" | 8 #include "base/auto_reset.h" |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
85 state_machine_.SetNeedsRedraw(); | 85 state_machine_.SetNeedsRedraw(); |
86 ProcessScheduledActions(); | 86 ProcessScheduledActions(); |
87 } | 87 } |
88 | 88 |
89 void Scheduler::SetNeedsManageTiles() { | 89 void Scheduler::SetNeedsManageTiles() { |
90 DCHECK(!IsInsideAction(SchedulerStateMachine::ACTION_MANAGE_TILES)); | 90 DCHECK(!IsInsideAction(SchedulerStateMachine::ACTION_MANAGE_TILES)); |
91 state_machine_.SetNeedsManageTiles(); | 91 state_machine_.SetNeedsManageTiles(); |
92 ProcessScheduledActions(); | 92 ProcessScheduledActions(); |
93 } | 93 } |
94 | 94 |
95 void Scheduler::SetMaxSwapsPending(int max) { | |
96 state_machine_.SetMaxSwapsPending(max); | |
97 } | |
98 | |
99 void Scheduler::DidSwapBuffers() { state_machine_.DidSwapBuffers(); } | |
danakj
2014/04/11 15:12:28
Why no ProcessScheduledActions()?
brianderson
2014/04/11 20:49:40
I guess it wouldn't hurt, but today this will only
| |
100 | |
95 void Scheduler::SetSwapUsedIncompleteTile(bool used_incomplete_tile) { | 101 void Scheduler::SetSwapUsedIncompleteTile(bool used_incomplete_tile) { |
96 state_machine_.SetSwapUsedIncompleteTile(used_incomplete_tile); | 102 state_machine_.SetSwapUsedIncompleteTile(used_incomplete_tile); |
97 ProcessScheduledActions(); | 103 ProcessScheduledActions(); |
98 } | 104 } |
99 | 105 |
106 void Scheduler::DidSwapBuffersComplete() { | |
107 state_machine_.DidSwapBuffersComplete(); | |
108 ProcessScheduledActions(); | |
109 } | |
110 | |
100 void Scheduler::SetSmoothnessTakesPriority(bool smoothness_takes_priority) { | 111 void Scheduler::SetSmoothnessTakesPriority(bool smoothness_takes_priority) { |
101 state_machine_.SetSmoothnessTakesPriority(smoothness_takes_priority); | 112 state_machine_.SetSmoothnessTakesPriority(smoothness_takes_priority); |
102 ProcessScheduledActions(); | 113 ProcessScheduledActions(); |
103 } | 114 } |
104 | 115 |
105 void Scheduler::NotifyReadyToCommit() { | 116 void Scheduler::NotifyReadyToCommit() { |
106 TRACE_EVENT0("cc", "Scheduler::NotifyReadyToCommit"); | 117 TRACE_EVENT0("cc", "Scheduler::NotifyReadyToCommit"); |
107 state_machine_.NotifyReadyToCommit(); | 118 state_machine_.NotifyReadyToCommit(); |
108 ProcessScheduledActions(); | 119 ProcessScheduledActions(); |
109 } | 120 } |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
556 } | 567 } |
557 | 568 |
558 bool Scheduler::IsBeginMainFrameSentOrStarted() const { | 569 bool Scheduler::IsBeginMainFrameSentOrStarted() const { |
559 return (state_machine_.commit_state() == | 570 return (state_machine_.commit_state() == |
560 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT || | 571 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_SENT || |
561 state_machine_.commit_state() == | 572 state_machine_.commit_state() == |
562 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED); | 573 SchedulerStateMachine::COMMIT_STATE_BEGIN_MAIN_FRAME_STARTED); |
563 } | 574 } |
564 | 575 |
565 } // namespace cc | 576 } // namespace cc |
OLD | NEW |