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

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: Fixed style 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
« no previous file with comments | « cc/layer_tree_host_impl.cc ('k') | cc/paint_time_counter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « cc/layer_tree_host_impl.cc ('k') | cc/paint_time_counter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698