Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(434)

Side by Side Diff: cc/scheduler/begin_frame_source.h

Issue 2825853002: Improvements to uses of base::SmallMap (Closed)
Patch Set: Review comments Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/resources/resource_provider.h ('k') | cc/scheduler/begin_frame_source.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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::flat_map<BeginFrameObserver*, uint64_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
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_
OLDNEW
« no previous file with comments | « cc/resources/resource_provider.h ('k') | cc/scheduler/begin_frame_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698