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

Side by Side Diff: cc/frame_rate_counter.h

Issue 11280312: cc: switch FPS counter graph back to a frame based X axis (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years 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 | « no previous file | cc/heads_up_display_layer_impl.cc » ('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 CC_FRAME_RATE_COUNTER_H_ 5 #ifndef CC_FRAME_RATE_COUNTER_H_
6 #define CC_FRAME_RATE_COUNTER_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"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // - if the frame is too fast, then given our compositor implementation, the frame probably was a no-op and did not draw. 45 // - if the frame is too fast, then given our compositor implementation, the frame probably was a no-op and did not draw.
46 // - if the frame is too slow, then there is probably not animating content, so we should not pollute the average. 46 // - if the frame is too slow, then there is probably not animating content, so we should not pollute the average.
47 static const double kFrameTooFast; 47 static const double kFrameTooFast;
48 static const double kFrameTooSlow; 48 static const double kFrameTooSlow;
49 49
50 // If a frame takes longer than this threshold (measured in seconds) then we 50 // If a frame takes longer than this threshold (measured in seconds) then we
51 // (naively) assume that it missed a screen refresh; that is, we dropped a f rame. 51 // (naively) assume that it missed a screen refresh; that is, we dropped a f rame.
52 // FIXME: Determine this threshold based on monitor refresh rate, crbug.com/ 138642. 52 // FIXME: Determine this threshold based on monitor refresh rate, crbug.com/ 138642.
53 static const double kDroppedFrameTime; 53 static const double kDroppedFrameTime;
54 54
55 static const int kTimeStampHistorySize = 170; 55 static const int kTimeStampHistorySize = 130;
56 56
57 bool m_hasImplThread; 57 bool m_hasImplThread;
58 58
59 int m_currentFrameNumber; 59 int m_currentFrameNumber;
60 base::TimeTicks m_timeStampHistory[kTimeStampHistorySize]; 60 base::TimeTicks m_timeStampHistory[kTimeStampHistorySize];
61 61
62 int m_droppedFrameCount; 62 int m_droppedFrameCount;
63 63
64 DISALLOW_COPY_AND_ASSIGN(FrameRateCounter); 64 DISALLOW_COPY_AND_ASSIGN(FrameRateCounter);
65 }; 65 };
66 66
67 } // namespace cc 67 } // namespace cc
68 68
69 #endif // CC_FRAME_RATE_COUNTER_H_ 69 #endif // CC_FRAME_RATE_COUNTER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/heads_up_display_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698