| Index: cc/paint_time_counter.h
|
| diff --git a/cc/paint_time_counter.h b/cc/paint_time_counter.h
|
| index d79db69e675dd1dd1353cc39dfd65f37beeb0a89..b110fc89e468f41d873acc4048d4858ccc980911 100644
|
| --- a/cc/paint_time_counter.h
|
| +++ b/cc/paint_time_counter.h
|
| @@ -19,18 +19,41 @@ class PaintTimeCounter {
|
|
|
| size_t HistorySize() const { return ring_buffer_.BufferSize(); }
|
|
|
| + struct Entry {
|
| + Entry()
|
| + : commit_number(0) { }
|
| +
|
| + int commit_number;
|
| + base::TimeDelta paint_time;
|
| + base::TimeDelta rasterize_time;
|
| +
|
| + base::TimeDelta total_time() const {
|
| + return paint_time + rasterize_time;
|
| + }
|
| + };
|
| +
|
| // n = 0 returns the oldest and
|
| // n = PaintTimeHistorySize() - 1 the most recent paint time.
|
| base::TimeDelta GetPaintTimeOfRecentFrame(const size_t& n) const;
|
|
|
| - void SavePaintTime(const base::TimeDelta& total_paint_time);
|
| + void SavePaintTime(const base::TimeDelta& total_paint_time,
|
| + int commit_number);
|
| + void SaveRasterizeTime(const base::TimeDelta& total_rasterize_time,
|
| + int commit_number);
|
| void GetMinAndMaxPaintTime(base::TimeDelta* min, base::TimeDelta* max) const;
|
|
|
| + void ClearHistory();
|
| +
|
| private:
|
| PaintTimeCounter();
|
|
|
| - RingBuffer<base::TimeDelta, 90> ring_buffer_;
|
| + RingBuffer<Entry, 90> ring_buffer_;
|
| +
|
| base::TimeDelta last_total_paint_time_;
|
| + base::TimeDelta last_total_rasterize_time_;
|
| +
|
| + bool can_save_paint_time_delta_;
|
| + bool can_save_rasterize_time_delta_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(PaintTimeCounter);
|
| };
|
|
|