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

Unified Diff: ui/events/latency_info.cc

Issue 123563002: Remove gpu side LatencyInfo merging (Closed) Base URL: http://git.chromium.org/chromium/src.git@gpu-per-event-latency-6-small
Patch Set: fix win_rel compiler error Created 6 years, 11 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
Index: ui/events/latency_info.cc
diff --git a/ui/events/latency_info.cc b/ui/events/latency_info.cc
index a3a11828db041ee90e844c9076a4d3bd70fb24e3..a8cb83ce636fe4c1c5894573fcdad4bd62adbc31 100644
--- a/ui/events/latency_info.cc
+++ b/ui/events/latency_info.cc
@@ -119,6 +119,16 @@ LatencyInfo::LatencyInfo() : trace_id(-1), terminated(false) {
LatencyInfo::~LatencyInfo() {
}
+bool LatencyInfo::Verify(const std::vector<LatencyInfo>& latency_info,
+ const char* referring_msg) {
+ if (latency_info.size() > kMaxLatencyInfoNumber) {
+ LOG(ERROR) << referring_msg << ", LatencyInfo vector size "
+ << latency_info.size() << " is too big.";
+ return false;
+ }
+ return true;
+}
+
void LatencyInfo::MergeWith(const LatencyInfo& other) {
for (LatencyMap::const_iterator it = other.latency_components.begin();
it != other.latency_components.end();

Powered by Google App Engine
This is Rietveld 408576698