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 <deque> | 8 #include <deque> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 &frame_sources_constructor)); | 90 &frame_sources_constructor)); |
91 } | 91 } |
92 | 92 |
93 ~Scheduler() override; | 93 ~Scheduler() override; |
94 | 94 |
95 // BeginFrameObserverMixin | 95 // BeginFrameObserverMixin |
96 bool OnBeginFrameMixInDelegate(const BeginFrameArgs& args) override; | 96 bool OnBeginFrameMixInDelegate(const BeginFrameArgs& args) override; |
97 | 97 |
98 const SchedulerSettings& settings() const { return settings_; } | 98 const SchedulerSettings& settings() const { return settings_; } |
99 | 99 |
| 100 void SetAuthoritativeVSyncInterval(const base::TimeDelta& interval); |
100 void CommitVSyncParameters(base::TimeTicks timebase, | 101 void CommitVSyncParameters(base::TimeTicks timebase, |
101 base::TimeDelta interval); | 102 base::TimeDelta interval); |
102 void SetEstimatedParentDrawTime(base::TimeDelta draw_time); | 103 void SetEstimatedParentDrawTime(base::TimeDelta draw_time); |
103 | 104 |
104 void SetCanStart(); | 105 void SetCanStart(); |
105 | 106 |
106 void SetVisible(bool visible); | 107 void SetVisible(bool visible); |
107 void SetCanDraw(bool can_draw); | 108 void SetCanDraw(bool can_draw); |
108 void NotifyReadyToActivate(); | 109 void NotifyReadyToActivate(); |
109 void NotifyReadyToDraw(); | 110 void NotifyReadyToDraw(); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 | 160 |
160 scoped_refptr<base::trace_event::ConvertableToTraceFormat> AsValue() const; | 161 scoped_refptr<base::trace_event::ConvertableToTraceFormat> AsValue() const; |
161 void AsValueInto(base::trace_event::TracedValue* value) const override; | 162 void AsValueInto(base::trace_event::TracedValue* value) const override; |
162 | 163 |
163 void SetContinuousPainting(bool continuous_painting) { | 164 void SetContinuousPainting(bool continuous_painting) { |
164 state_machine_.SetContinuousPainting(continuous_painting); | 165 state_machine_.SetContinuousPainting(continuous_painting); |
165 } | 166 } |
166 | 167 |
167 void SetChildrenNeedBeginFrames(bool children_need_begin_frames); | 168 void SetChildrenNeedBeginFrames(bool children_need_begin_frames); |
168 | 169 |
169 void SetAuthoritativeVSyncInterval(const base::TimeDelta& interval); | |
170 | |
171 protected: | 170 protected: |
172 Scheduler(SchedulerClient* client, | 171 Scheduler(SchedulerClient* client, |
173 const SchedulerSettings& scheduler_settings, | 172 const SchedulerSettings& scheduler_settings, |
174 int layer_tree_host_id, | 173 int layer_tree_host_id, |
175 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, | 174 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, |
176 scoped_ptr<BeginFrameSource> external_begin_frame_source, | 175 scoped_ptr<BeginFrameSource> external_begin_frame_source, |
177 SchedulerFrameSourcesConstructor* frame_sources_constructor); | 176 SchedulerFrameSourcesConstructor* frame_sources_constructor); |
178 | 177 |
179 // virtual for testing - Don't call these in the constructor or | 178 // virtual for testing - Don't call these in the constructor or |
180 // destructor! | 179 // destructor! |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 | 250 |
252 friend class SchedulerFrameSourcesConstructor; | 251 friend class SchedulerFrameSourcesConstructor; |
253 friend class TestSchedulerFrameSourcesConstructor; | 252 friend class TestSchedulerFrameSourcesConstructor; |
254 | 253 |
255 DISALLOW_COPY_AND_ASSIGN(Scheduler); | 254 DISALLOW_COPY_AND_ASSIGN(Scheduler); |
256 }; | 255 }; |
257 | 256 |
258 } // namespace cc | 257 } // namespace cc |
259 | 258 |
260 #endif // CC_SCHEDULER_SCHEDULER_H_ | 259 #endif // CC_SCHEDULER_SCHEDULER_H_ |
OLD | NEW |