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 #ifndef CCFrameRateCounter_h | 5 #ifndef CC_FRAME_RATE_COUNTER_H_ |
6 #define CCFrameRateCounter_h | 6 #define CC_FRAME_RATE_COUNTER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/time.h" | 10 #include "base/time.h" |
11 | 11 |
12 namespace cc { | 12 namespace cc { |
13 | 13 |
14 // This class maintains a history of timestamps, and provides functionality to | 14 // This class maintains a history of timestamps, and provides functionality to |
15 // intelligently compute average frames per second (and standard deviation). | 15 // intelligently compute average frames per second (and standard deviation). |
16 class FrameRateCounter { | 16 class FrameRateCounter { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 int m_currentFrameNumber; | 56 int m_currentFrameNumber; |
57 base::TimeTicks m_timeStampHistory[kTimeStampHistorySize]; | 57 base::TimeTicks m_timeStampHistory[kTimeStampHistorySize]; |
58 | 58 |
59 int m_droppedFrameCount; | 59 int m_droppedFrameCount; |
60 | 60 |
61 DISALLOW_COPY_AND_ASSIGN(FrameRateCounter); | 61 DISALLOW_COPY_AND_ASSIGN(FrameRateCounter); |
62 }; | 62 }; |
63 | 63 |
64 } // namespace cc | 64 } // namespace cc |
65 | 65 |
66 #endif | 66 #endif // CC_FRAME_RATE_COUNTER_H_ |
OLD | NEW |