summaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authorernstm@chromium.org <ernstm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-07 00:09:05 +0000
committerernstm@chromium.org <ernstm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-07 00:09:05 +0000
commitf5b05fe2c98e47a7def9cbd1a334a442db825ca9 (patch)
tree952f4698ee320e5ca46a60fa011f2d094959d6e2 /cc
parent2fb9bd24e13c39b4708ec809987d2fbfe511729a (diff)
downloadchromium_src-f5b05fe2c98e47a7def9cbd1a334a442db825ca9.zip
chromium_src-f5b05fe2c98e47a7def9cbd1a334a442db825ca9.tar.gz
chromium_src-f5b05fe2c98e47a7def9cbd1a334a442db825ca9.tar.bz2
cc: Fixed computation of dropped frames.
- Computation of dropped frames now correctly accounts for multi-frame drops. - A welcome side-effect is that variance of the percentage_dropped metric is reduced significantly. - Heads-up for the perf sherrifs: percentage_dropped will increase quite a bit with this patch. R=tonyg@chromium.org, nduca@chromium.org BUG=264308 Review URL: https://chromiumcodereview.appspot.com/23998002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221825 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc')
-rw-r--r--cc/debug/frame_rate_counter.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/cc/debug/frame_rate_counter.cc b/cc/debug/frame_rate_counter.cc
index 11632b1..2f3b291 100644
--- a/cc/debug/frame_rate_counter.cc
+++ b/cc/debug/frame_rate_counter.cc
@@ -73,7 +73,8 @@ void FrameRateCounter::SaveTimeStamp(base::TimeTicks timestamp, bool software) {
if (!IsBadFrameInterval(frame_interval_seconds) &&
frame_interval_seconds.InSecondsF() > kDroppedFrameTime)
- ++dropped_frame_count_;
+ dropped_frame_count_ +=
+ frame_interval_seconds.InSecondsF() / kDroppedFrameTime;
}
bool FrameRateCounter::IsBadFrameInterval(