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

Issue 2892813002: Fix off-by-one in fps_meter, fix unit test to catch this. (Closed)

Created:
3 years, 7 months ago by klausw
Modified:
3 years, 7 months ago
CC:
chromium-reviews, feature-vr-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix off-by-one in fps_meter, fix unit test to catch this. The FPS counter returned bogus negative values as soon as the sample count reached kNumFrameTimes since it subtracted a zero value that was never set due to an off-by-one error. Unfortunately the unit test didn't catch this since it never filled the sample buffer. Fixed the test to cover this. Also reduce kNumFrameTimes to 10, smoothing over 200 frames seems excessive. We just want a bit of smoothing but should be able to see some reaction to temporary glitches since these are quite visible in VR. BUG= Review-Url: https://codereview.chromium.org/2892813002 Cr-Commit-Position: refs/heads/master@{#473810} Committed: https://chromium.googlesource.com/chromium/src/+/c90c34417bb295752d1e7fa96ba5d41c106917fd

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -3 lines) Patch
M chrome/browser/android/vr_shell/fps_meter.h View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/android/vr_shell/fps_meter.cc View 3 chunks +6 lines, -2 lines 0 comments Download
M chrome/browser/android/vr_shell/fps_meter_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 20 (11 generated)
klausw
FYI, I ran into this issue while adding debug output for the FPS meter.
3 years, 7 months ago (2017-05-18 18:38:54 UTC) #2
klausw
On 2017/05/18 18:38:54, klausw wrote: > FYI, I ran into this issue while adding debug ...
3 years, 7 months ago (2017-05-22 20:51:37 UTC) #7
Ian Vollick
On 2017/05/22 20:51:37, klausw wrote: > On 2017/05/18 18:38:54, klausw wrote: > > FYI, I ...
3 years, 7 months ago (2017-05-22 22:33:59 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2892813002/1
3 years, 7 months ago (2017-05-22 23:59:57 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/444349)
3 years, 7 months ago (2017-05-23 00:10:41 UTC) #12
klausw
On 2017/05/23 00:10:41, commit-bot: I haz the power wrote: > Try jobs failed on following ...
3 years, 7 months ago (2017-05-23 01:19:58 UTC) #13
mthiesse
lgtm
3 years, 7 months ago (2017-05-23 04:29:50 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2892813002/1
3 years, 7 months ago (2017-05-23 04:30:19 UTC) #17
commit-bot: I haz the power
3 years, 7 months ago (2017-05-23 04:35:10 UTC) #20
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/c90c34417bb295752d1e7fa96ba5...

Powered by Google App Engine
This is Rietveld 408576698