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

Side by Side Diff: chrome/browser/android/vr_shell/fps_meter.h

Issue 2804943003: [vr] Add a frame rate counter for the vr UI (Closed)
Patch Set: dcheck is on Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/android/vr_shell/BUILD.gn ('k') | chrome/browser/android/vr_shell/fps_meter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_ANDROID_VR_SHELL_FPS_METER_H_
6 #define CHROME_BROWSER_ANDROID_VR_SHELL_FPS_METER_H_
7
8 #include <vector>
9
10 #include "base/macros.h"
11 #include "base/time/time.h"
12
13 namespace vr_shell {
14
15 // Computes fps based on submitted frame times.
16 class FPSMeter {
17 public:
18 FPSMeter();
19 ~FPSMeter();
20
21 void AddFrame(const base::TimeTicks& time_stamp);
22
23 bool CanComputeFPS() const;
24
25 double GetFPS() const;
26
27 private:
28 size_t current_index_;
29 int64_t total_time_us_;
30 base::TimeTicks last_time_stamp_;
31 std::vector<base::TimeDelta> frame_times_;
32 DISALLOW_COPY_AND_ASSIGN(FPSMeter);
33 };
34
35 } // namespace vr_shell
36
37 #endif // CHROME_BROWSER_ANDROID_VR_SHELL_FPS_METER_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/BUILD.gn ('k') | chrome/browser/android/vr_shell/fps_meter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698