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

Side by Side Diff: cc/CCFrameRateCounter.h

Issue 10914268: Change cc files from namespace WebCore to cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « cc/CCFrameRateControllerTest.cpp ('k') | cc/CCFrameRateCounter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 CCFrameRateCounter_h
6 #define CCFrameRateCounter_h 6 #define CCFrameRateCounter_h
7 7
8 #if USE(ACCELERATED_COMPOSITING) 8 #if USE(ACCELERATED_COMPOSITING)
9 9
10 #include <wtf/Noncopyable.h> 10 #include <wtf/Noncopyable.h>
11 #include <wtf/PassOwnPtr.h> 11 #include <wtf/PassOwnPtr.h>
12 12
13 namespace WebCore { 13 namespace cc {
14 14
15 // This class maintains a history of timestamps, and provides functionality to 15 // This class maintains a history of timestamps, and provides functionality to
16 // intelligently compute average frames per second (and standard deviation). 16 // intelligently compute average frames per second (and standard deviation).
17 class CCFrameRateCounter { 17 class CCFrameRateCounter {
18 WTF_MAKE_NONCOPYABLE(CCFrameRateCounter); 18 WTF_MAKE_NONCOPYABLE(CCFrameRateCounter);
19 public: 19 public:
20 static PassOwnPtr<CCFrameRateCounter> create() 20 static PassOwnPtr<CCFrameRateCounter> create()
21 { 21 {
22 return adoptPtr(new CCFrameRateCounter()); 22 return adoptPtr(new CCFrameRateCounter());
23 } 23 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 static const double kDroppedFrameTime; 57 static const double kDroppedFrameTime;
58 58
59 static const int kTimeStampHistorySize = 120; 59 static const int kTimeStampHistorySize = 120;
60 60
61 int m_currentFrameNumber; 61 int m_currentFrameNumber;
62 double m_timeStampHistory[kTimeStampHistorySize]; 62 double m_timeStampHistory[kTimeStampHistorySize];
63 63
64 int m_droppedFrameCount; 64 int m_droppedFrameCount;
65 }; 65 };
66 66
67 } // namespace WebCore 67 } // namespace cc
68 68
69 #endif // USE(ACCELERATED_COMPOSITING) 69 #endif // USE(ACCELERATED_COMPOSITING)
70 70
71 #endif 71 #endif
OLDNEW
« no previous file with comments | « cc/CCFrameRateControllerTest.cpp ('k') | cc/CCFrameRateCounter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698