| Index: cc/rendering_stats_subscriber.h
|
| diff --git a/cc/rendering_stats_subscriber.h b/cc/rendering_stats_subscriber.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..48b66d036339d07bebdea51cb4a3fa8e7ac8284c
|
| --- /dev/null
|
| +++ b/cc/rendering_stats_subscriber.h
|
| @@ -0,0 +1,40 @@
|
| +// Copyright 2012 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef rendering_stats_subscriber_h
|
| +#define rendering_stats_subscriber_h
|
| +
|
| +#include "base/memory/scoped_ptr.h"
|
| +#include "base/time.h"
|
| +
|
| +#include <vector>
|
| +
|
| +namespace cc {
|
| +
|
| +class RenderingStatsSubscriber {
|
| +public:
|
| + static scoped_ptr<RenderingStatsSubscriber> create();
|
| +
|
| + virtual ~RenderingStatsSubscriber();
|
| +
|
| + // Will have functions here to inform the subscriber of the goings on in the
|
| + // compositor.
|
| + void markBeginningOfFrame(base::TimeTicks timestamp);
|
| +
|
| + void handledScrollEvent(bool content_did_move);
|
| +
|
| + void getFPSAndStandardDeviation(double& average_fps,
|
| + double& standard_deviation) const;
|
| +
|
| +private:
|
| + RenderingStatsSubscriber();
|
| +
|
| + std::vector<base::TimeTicks> time_stamp_history_;
|
| + bool is_scrolling_;
|
| + bool has_scrolled_;
|
| +};
|
| +
|
| +} // namespace cc
|
| +
|
| +#endif // rendering_stats_subscriber_h
|
|
|