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

Unified Diff: ui/latency/latency_info.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/value.h ('k') | ui/ozone/platform/drm/common/drm_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/latency/latency_info.h
diff --git a/ui/latency/latency_info.h b/ui/latency/latency_info.h
index 600f8745cd20e61cd800707c3a89d9a17b6e9e08..11cb6c717944911f9770445ff6a1d460139f6923 100644
--- a/ui/latency/latency_info.h
+++ b/ui/latency/latency_info.h
@@ -12,7 +12,7 @@
#include <utility>
#include <vector>
-#include "base/containers/small_map.h"
+#include "base/containers/flat_map.h"
#include "base/time/time.h"
#include "ui/gfx/geometry/point_f.h"
@@ -130,16 +130,12 @@ class LatencyInfo {
base::TimeTicks last_event_time;
};
- // Empirically determined constant based on a typical scroll sequence.
- enum { kTypicalMaxComponentsPerLatencyInfo = 10 };
-
enum : size_t { kMaxInputCoordinates = 2 };
// Map a Latency Component (with a component-specific int64_t id) to a
// component info.
- typedef base::SmallMap<
- std::map<std::pair<LatencyComponentType, int64_t>, LatencyComponent>,
- kTypicalMaxComponentsPerLatencyInfo> LatencyMap;
+ using LatencyMap = base::flat_map<std::pair<LatencyComponentType, int64_t>,
+ LatencyComponent>;
LatencyInfo();
LatencyInfo(const LatencyInfo& other);
« no previous file with comments | « tools/gn/value.h ('k') | ui/ozone/platform/drm/common/drm_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698