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 #ifndef CC_SCHEDULER_SCHEDULER_H_ | 5 #ifndef CC_SCHEDULER_SCHEDULER_H_ |
6 #define CC_SCHEDULER_SCHEDULER_H_ | 6 #define CC_SCHEDULER_SCHEDULER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 void BeginImplFrame(const BeginFrameArgs& args); | 111 void BeginImplFrame(const BeginFrameArgs& args); |
112 void OnBeginImplFrameDeadline(); | 112 void OnBeginImplFrameDeadline(); |
113 void PollForAnticipatedDrawTriggers(); | 113 void PollForAnticipatedDrawTriggers(); |
114 | 114 |
115 scoped_ptr<base::Value> StateAsValue() const; | 115 scoped_ptr<base::Value> StateAsValue() const; |
116 | 116 |
117 bool IsInsideAction(SchedulerStateMachine::Action action) { | 117 bool IsInsideAction(SchedulerStateMachine::Action action) { |
118 return inside_action_ == action; | 118 return inside_action_ == action; |
119 } | 119 } |
120 | 120 |
| 121 bool IsBeginMainFrameSent() const; |
| 122 |
121 private: | 123 private: |
122 Scheduler(SchedulerClient* client, | 124 Scheduler(SchedulerClient* client, |
123 const SchedulerSettings& scheduler_settings, | 125 const SchedulerSettings& scheduler_settings, |
124 int layer_tree_host_id); | 126 int layer_tree_host_id); |
125 | 127 |
126 void PostBeginImplFrameDeadline(base::TimeTicks deadline); | 128 void PostBeginImplFrameDeadline(base::TimeTicks deadline); |
127 void SetupNextBeginImplFrameIfNeeded(); | 129 void SetupNextBeginImplFrameIfNeeded(); |
128 void ActivatePendingTree(); | 130 void ActivatePendingTree(); |
129 void DrawAndSwapIfPossible(); | 131 void DrawAndSwapIfPossible(); |
130 void DrawAndSwapForced(); | 132 void DrawAndSwapForced(); |
(...skipping 20 matching lines...) Expand all Loading... |
151 SchedulerStateMachine::Action inside_action_; | 153 SchedulerStateMachine::Action inside_action_; |
152 | 154 |
153 base::WeakPtrFactory<Scheduler> weak_factory_; | 155 base::WeakPtrFactory<Scheduler> weak_factory_; |
154 | 156 |
155 DISALLOW_COPY_AND_ASSIGN(Scheduler); | 157 DISALLOW_COPY_AND_ASSIGN(Scheduler); |
156 }; | 158 }; |
157 | 159 |
158 } // namespace cc | 160 } // namespace cc |
159 | 161 |
160 #endif // CC_SCHEDULER_SCHEDULER_H_ | 162 #endif // CC_SCHEDULER_SCHEDULER_H_ |
OLD | NEW |