| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 int m_currentFrameNumber; | 58 int m_currentFrameNumber; |
| 59 base::TimeTicks m_timeStampHistory[kTimeStampHistorySize]; | 59 base::TimeTicks m_timeStampHistory[kTimeStampHistorySize]; |
| 60 | 60 |
| 61 int m_droppedFrameCount; | 61 int m_droppedFrameCount; |
| 62 | 62 |
| 63 DISALLOW_COPY_AND_ASSIGN(FrameRateCounter); | 63 DISALLOW_COPY_AND_ASSIGN(FrameRateCounter); |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 } // namespace cc | 66 } // namespace cc |
| 67 | 67 |
| 68 #endif | 68 #endif // CC_FRAME_RATE_COUNTER_H_ |
| OLD | NEW |