Index: webrtc/system_wrappers/source/metrics_default.cc |
diff --git a/webrtc/system_wrappers/source/metrics_default.cc b/webrtc/system_wrappers/source/metrics_default.cc |
index 49004543ea177938a7cd49a6ab6a784f5af26ee8..fd7610b1130bdd5956ceb8516ee7fb510206fd7d 100644 |
--- a/webrtc/system_wrappers/source/metrics_default.cc |
+++ b/webrtc/system_wrappers/source/metrics_default.cc |
@@ -244,6 +244,15 @@ void HistogramAdd(Histogram* histogram_pointer, |
ptr->Add(sample); |
} |
+// Fast path. Adds |sample| to cached |histogram_pointer|. |
+void HistogramAdd(Histogram* histogram_pointer, int sample) { |
+ if (!histogram_pointer) |
+ return; |
+ |
+ RtcHistogram* ptr = reinterpret_cast<RtcHistogram*>(histogram_pointer); |
+ ptr->Add(sample); |
+} |
+ |
SampleInfo::SampleInfo(const std::string& name, |
int min, |
int max, |