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

Side by Side Diff: cc/rendering_stats_subscriber.h

Issue 11198005: NOT READY FOR REVIEW - switch to a subscriber model for rendering stats (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added missing file. Created 8 years, 1 month 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/rendering_stats.cc ('k') | cc/rendering_stats_subscriber.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef rendering_stats_subscriber_h
6 #define rendering_stats_subscriber_h
7
8 #include "base/memory/scoped_ptr.h"
9 #include "base/time.h"
10
11 #include <vector>
12
13 namespace cc {
14
15 class RenderingStatsSubscriber {
16 public:
17 static scoped_ptr<RenderingStatsSubscriber> create();
18
19 virtual ~RenderingStatsSubscriber();
20
21 // Will have functions here to inform the subscriber of the goings on in the
22 // compositor.
23 void markBeginningOfFrame(base::TimeTicks timestamp);
24
25 void handledScrollEvent(bool content_did_move);
26
27 void getFPSAndStandardDeviation(double& average_fps,
28 double& standard_deviation) const;
29
30 private:
31 RenderingStatsSubscriber();
32
33 std::vector<base::TimeTicks> time_stamp_history_;
34 bool is_scrolling_;
35 bool has_scrolled_;
36 };
37
38 } // namespace cc
39
40 #endif // rendering_stats_subscriber_h
OLDNEW
« no previous file with comments | « cc/rendering_stats.cc ('k') | cc/rendering_stats_subscriber.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698