forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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}
- Loading branch information
Showing
3 changed files
with
10 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters