Chromium Code Reviews| 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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 276 | 276 |
| 277 private: | 277 private: |
| 278 void SourceChanged(const BeginFrameArgs& args); | 278 void SourceChanged(const BeginFrameArgs& args); |
| 279 | 279 |
| 280 uint32_t current_source_id_ = 0; | 280 uint32_t current_source_id_ = 0; |
| 281 uint64_t current_sequence_number_ = BeginFrameArgs::kStartingFrameNumber; | 281 uint64_t current_sequence_number_ = BeginFrameArgs::kStartingFrameNumber; |
| 282 // Small sets, but order matters for intersection computation. | 282 // Small sets, but order matters for intersection computation. |
| 283 base::flat_set<BeginFrameObserver*> observers_; | 283 base::flat_set<BeginFrameObserver*> observers_; |
| 284 base::flat_set<BeginFrameObserver*> finished_observers_; | 284 base::flat_set<BeginFrameObserver*> finished_observers_; |
| 285 bool observers_had_damage_ = false; | 285 bool observers_had_damage_ = false; |
| 286 base::SmallMap<std::map<BeginFrameObserver*, uint64_t>, 4> | 286 base::small_map<std::map<BeginFrameObserver*, uint64_t>, 4> |
|
danakj
2017/04/18 21:35:50
This should really be a flat_map, there's no way t
| |
| 287 latest_confirmed_sequence_numbers_; | 287 latest_confirmed_sequence_numbers_; |
| 288 | 288 |
| 289 DISALLOW_COPY_AND_ASSIGN(BeginFrameObserverAckTracker); | 289 DISALLOW_COPY_AND_ASSIGN(BeginFrameObserverAckTracker); |
| 290 }; | 290 }; |
| 291 | 291 |
| 292 class CC_EXPORT ExternalBeginFrameSourceClient { | 292 class CC_EXPORT ExternalBeginFrameSourceClient { |
| 293 public: | 293 public: |
| 294 // Only called when changed. Assumed false by default. | 294 // Only called when changed. Assumed false by default. |
| 295 virtual void OnNeedsBeginFrames(bool needs_begin_frames) = 0; | 295 virtual void OnNeedsBeginFrames(bool needs_begin_frames) = 0; |
| 296 // Called when all observers have completed a frame. | 296 // Called when all observers have completed a frame. |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 329 bool frame_active_ = false; | 329 bool frame_active_ = false; |
| 330 BeginFrameObserverAckTracker ack_tracker_; | 330 BeginFrameObserverAckTracker ack_tracker_; |
| 331 | 331 |
| 332 private: | 332 private: |
| 333 DISALLOW_COPY_AND_ASSIGN(ExternalBeginFrameSource); | 333 DISALLOW_COPY_AND_ASSIGN(ExternalBeginFrameSource); |
| 334 }; | 334 }; |
| 335 | 335 |
| 336 } // namespace cc | 336 } // namespace cc |
| 337 | 337 |
| 338 #endif // CC_SCHEDULER_BEGIN_FRAME_SOURCE_H_ | 338 #endif // CC_SCHEDULER_BEGIN_FRAME_SOURCE_H_ |
| OLD | NEW |