Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / ui / events / latency_info.cc
index 5c9f8c8..0e38f20 100644 (file)
@@ -132,6 +132,21 @@ bool LatencyInfo::Verify(const std::vector<LatencyInfo>& latency_info,
   return true;
 }
 
+void LatencyInfo::CopyLatencyFrom(const LatencyInfo& other,
+                                  LatencyComponentType type) {
+  for (LatencyMap::const_iterator it = other.latency_components.begin();
+       it != other.latency_components.end();
+       ++it) {
+    if (it->first.first == type) {
+      AddLatencyNumberWithTimestamp(it->first.first,
+                                    it->first.second,
+                                    it->second.sequence_number,
+                                    it->second.event_time,
+                                    it->second.event_count);
+    }
+  }
+}
+
 void LatencyInfo::AddNewLatencyFrom(const LatencyInfo& other) {
     for (LatencyMap::const_iterator it = other.latency_components.begin();
          it != other.latency_components.end();