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

Unified Diff: cc/paint_time_counter.h

Issue 12209022: cc: add rasterize time to continuous painting graph data in impl-side-painting (Closed) Base URL: http://git.chromium.org/chromium/src.git@raster
Patch Set: Rebase to 182752 Created 7 years, 10 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
Index: cc/paint_time_counter.h
diff --git a/cc/paint_time_counter.h b/cc/paint_time_counter.h
index d79db69e675dd1dd1353cc39dfd65f37beeb0a89..3561b990a2fe0396196490d3e514e6c357a79be2 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 time() const {
danakj 2013/02/15 18:45:06 nit: total_time()?
+ 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,
+ const int& commit_number);
danakj 2013/02/15 18:45:06 int by value
+ void SaveRasterizeTime(const base::TimeDelta& total_rasterize_time,
+ const int& commit_number);
danakj 2013/02/15 18:45:06 int by value
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;
danakj 2013/02/15 18:45:06 these should have _ suffix
+ bool can_save_rasterize_time_delta;
DISALLOW_COPY_AND_ASSIGN(PaintTimeCounter);
};

Powered by Google App Engine
This is Rietveld 408576698