OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "cc/debug/frame_rate_counter.h" | 5 #include "cc/debug/frame_rate_counter.h" |
6 | 6 |
| 7 #include <algorithm> |
7 #include <limits> | 8 #include <limits> |
8 | 9 |
9 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
10 #include "cc/trees/proxy.h" | 11 #include "cc/trees/proxy.h" |
11 | 12 |
12 namespace cc { | 13 namespace cc { |
13 | 14 |
14 // The following constants are measured in seconds. | 15 // The following constants are measured in seconds. |
15 | 16 |
16 // Two thresholds (measured in seconds) that describe what is considered to be a | 17 // Two thresholds (measured in seconds) that describe what is considered to be a |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 | 129 |
129 if (frame_count) { | 130 if (frame_count) { |
130 DCHECK_GT(frame_times_total, 0.0); | 131 DCHECK_GT(frame_times_total, 0.0); |
131 average_fps = frame_count / frame_times_total; | 132 average_fps = frame_count / frame_times_total; |
132 } | 133 } |
133 | 134 |
134 return average_fps; | 135 return average_fps; |
135 } | 136 } |
136 | 137 |
137 } // namespace cc | 138 } // namespace cc |
OLD | NEW |