DescriptionFix 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 #
Messages
Total messages: 20 (11 generated)
|