OLD | NEW |
(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 |
OLD | NEW |