OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_BEGIN_FRAME_SOURCE_H_ | 5 #ifndef CC_SCHEDULER_BEGIN_FRAME_SOURCE_H_ |
6 #define CC_SCHEDULER_BEGIN_FRAME_SOURCE_H_ | 6 #define CC_SCHEDULER_BEGIN_FRAME_SOURCE_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 // This notifies that the subclass that it must turn on or off its mechnanism | 148 // This notifies that the subclass that it must turn on or off its mechnanism |
149 // for producing BeginFrames. | 149 // for producing BeginFrames. |
150 virtual void OnNeedsBeginFramesChanged(bool needs_begin_frames) {} | 150 virtual void OnNeedsBeginFramesChanged(bool needs_begin_frames) {} |
151 | 151 |
152 bool needs_begin_frames() const { return !observers_.empty(); } | 152 bool needs_begin_frames() const { return !observers_.empty(); } |
153 | 153 |
154 std::set<BeginFrameObserver*> observers_; | 154 std::set<BeginFrameObserver*> observers_; |
155 bool paused_; | 155 bool paused_; |
156 | 156 |
157 private: | 157 private: |
158 bool inside_as_value_into_; | |
159 | |
160 DISALLOW_COPY_AND_ASSIGN(BeginFrameSourceBase); | 158 DISALLOW_COPY_AND_ASSIGN(BeginFrameSourceBase); |
161 }; | 159 }; |
162 | 160 |
163 // A frame source which calls BeginFrame (at the next possible time) as soon as | 161 // A frame source which calls BeginFrame (at the next possible time) as soon as |
164 // remaining frames reaches zero. | 162 // remaining frames reaches zero. |
165 class CC_EXPORT BackToBackBeginFrameSource : public BeginFrameSourceBase { | 163 class CC_EXPORT BackToBackBeginFrameSource : public BeginFrameSourceBase { |
166 public: | 164 public: |
167 explicit BackToBackBeginFrameSource( | 165 explicit BackToBackBeginFrameSource( |
168 base::SingleThreadTaskRunner* task_runner); | 166 base::SingleThreadTaskRunner* task_runner); |
169 ~BackToBackBeginFrameSource() override; | 167 ~BackToBackBeginFrameSource() override; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 base::TimeTicks last_timebase_; | 219 base::TimeTicks last_timebase_; |
222 base::TimeDelta authoritative_interval_; | 220 base::TimeDelta authoritative_interval_; |
223 | 221 |
224 private: | 222 private: |
225 DISALLOW_COPY_AND_ASSIGN(SyntheticBeginFrameSource); | 223 DISALLOW_COPY_AND_ASSIGN(SyntheticBeginFrameSource); |
226 }; | 224 }; |
227 | 225 |
228 } // namespace cc | 226 } // namespace cc |
229 | 227 |
230 #endif // CC_SCHEDULER_BEGIN_FRAME_SOURCE_H_ | 228 #endif // CC_SCHEDULER_BEGIN_FRAME_SOURCE_H_ |
OLD | NEW |