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

Unified Diff: cc/frame_rate_counter.h

Issue 11232051: Remove static thread pointers from CC (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address code review comments and fix all cc_unittests Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/font_atlas.cc ('k') | cc/frame_rate_counter.cc » ('j') | cc/gl_renderer.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/frame_rate_counter.h
diff --git a/cc/frame_rate_counter.h b/cc/frame_rate_counter.h
index 008c2f30e5551f3de73e21506c3fefb3429d5e5d..bc1765bfbff816912ad4777f11bba639382b8b78 100644
--- a/cc/frame_rate_counter.h
+++ b/cc/frame_rate_counter.h
@@ -15,7 +15,7 @@ namespace cc {
// intelligently compute average frames per second (and standard deviation).
class FrameRateCounter {
public:
- static scoped_ptr<FrameRateCounter> create();
+ static scoped_ptr<FrameRateCounter> create(bool hasImplThread);
void markBeginningOfFrame(base::TimeTicks timestamp);
void markEndOfFrame();
@@ -34,7 +34,7 @@ public:
int droppedFrameCount() const { return m_droppedFrameCount; }
private:
- FrameRateCounter();
+ explicit FrameRateCounter(bool hasImplThread);
base::TimeDelta frameInterval(int frameNumber) const;
int frameIndex(int frameNumber) const;
@@ -53,6 +53,8 @@ private:
static const int kTimeStampHistorySize = 120;
+ bool m_hasImplThread;
+
int m_currentFrameNumber;
base::TimeTicks m_timeStampHistory[kTimeStampHistorySize];
« no previous file with comments | « cc/font_atlas.cc ('k') | cc/frame_rate_counter.cc » ('j') | cc/gl_renderer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698