| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 void OnDrawForOutputSurface(); | 98 void OnDrawForOutputSurface(); |
| 99 | 99 |
| 100 const SchedulerSettings& settings() const { return settings_; } | 100 const SchedulerSettings& settings() const { return settings_; } |
| 101 | 101 |
| 102 void SetAuthoritativeVSyncInterval(const base::TimeDelta& interval); | |
| 103 void CommitVSyncParameters(base::TimeTicks timebase, | 102 void CommitVSyncParameters(base::TimeTicks timebase, |
| 104 base::TimeDelta interval); | 103 base::TimeDelta interval); |
| 105 void SetEstimatedParentDrawTime(base::TimeDelta draw_time); | 104 void SetEstimatedParentDrawTime(base::TimeDelta draw_time); |
| 106 | 105 |
| 107 void SetCanStart(); | 106 void SetCanStart(); |
| 108 | 107 |
| 109 void SetVisible(bool visible); | 108 void SetVisible(bool visible); |
| 110 void SetCanDraw(bool can_draw); | 109 void SetCanDraw(bool can_draw); |
| 111 void NotifyReadyToActivate(); | 110 void NotifyReadyToActivate(); |
| 112 void NotifyReadyToDraw(); | 111 void NotifyReadyToDraw(); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 | 163 |
| 165 scoped_refptr<base::trace_event::ConvertableToTraceFormat> AsValue() const; | 164 scoped_refptr<base::trace_event::ConvertableToTraceFormat> AsValue() const; |
| 166 void AsValueInto(base::trace_event::TracedValue* value) const override; | 165 void AsValueInto(base::trace_event::TracedValue* value) const override; |
| 167 | 166 |
| 168 void SetContinuousPainting(bool continuous_painting) { | 167 void SetContinuousPainting(bool continuous_painting) { |
| 169 state_machine_.SetContinuousPainting(continuous_painting); | 168 state_machine_.SetContinuousPainting(continuous_painting); |
| 170 } | 169 } |
| 171 | 170 |
| 172 void SetChildrenNeedBeginFrames(bool children_need_begin_frames); | 171 void SetChildrenNeedBeginFrames(bool children_need_begin_frames); |
| 173 | 172 |
| 173 void SetAuthoritativeVSyncInterval(const base::TimeDelta& interval); |
| 174 |
| 174 protected: | 175 protected: |
| 175 Scheduler(SchedulerClient* client, | 176 Scheduler(SchedulerClient* client, |
| 176 const SchedulerSettings& scheduler_settings, | 177 const SchedulerSettings& scheduler_settings, |
| 177 int layer_tree_host_id, | 178 int layer_tree_host_id, |
| 178 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, | 179 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, |
| 179 scoped_ptr<BeginFrameSource> external_begin_frame_source, | 180 scoped_ptr<BeginFrameSource> external_begin_frame_source, |
| 180 SchedulerFrameSourcesConstructor* frame_sources_constructor); | 181 SchedulerFrameSourcesConstructor* frame_sources_constructor); |
| 181 | 182 |
| 182 // virtual for testing - Don't call these in the constructor or | 183 // virtual for testing - Don't call these in the constructor or |
| 183 // destructor! | 184 // destructor! |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 | 252 |
| 252 friend class SchedulerFrameSourcesConstructor; | 253 friend class SchedulerFrameSourcesConstructor; |
| 253 friend class TestSchedulerFrameSourcesConstructor; | 254 friend class TestSchedulerFrameSourcesConstructor; |
| 254 | 255 |
| 255 DISALLOW_COPY_AND_ASSIGN(Scheduler); | 256 DISALLOW_COPY_AND_ASSIGN(Scheduler); |
| 256 }; | 257 }; |
| 257 | 258 |
| 258 } // namespace cc | 259 } // namespace cc |
| 259 | 260 |
| 260 #endif // CC_SCHEDULER_SCHEDULER_H_ | 261 #endif // CC_SCHEDULER_SCHEDULER_H_ |
| OLD | NEW |