Index: cc/scheduler/compositor_timing_history.h |
diff --git a/cc/scheduler/compositor_timing_history.h b/cc/scheduler/compositor_timing_history.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7ff32fa73ae08eae4b14b5317211621d49313094 |
--- /dev/null |
+++ b/cc/scheduler/compositor_timing_history.h |
@@ -0,0 +1,61 @@ |
+// Copyright 2014 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 CC_SCHEDULER_COMPOSITOR_TIMING_HISTORY_H_ |
+#define CC_SCHEDULER_COMPOSITOR_TIMING_HISTORY_H_ |
+ |
+#include "cc/base/rolling_time_delta_history.h" |
+ |
+namespace cc { |
+ |
+class RenderingStatsInstrumentation; |
+ |
+class CompositorTimingHistory { |
+ public: |
+ explicit CompositorTimingHistory( |
+ RenderingStatsInstrumentation* rendering_stats_instrumentation); |
+ ~CompositorTimingHistory(); |
+ |
+ base::TimeDelta BeginMainFrameToCommitDurationEstimate() const; |
+ base::TimeDelta PrepareTilesDurationEstimate() const; |
+ base::TimeDelta PrepareTilesToReadyToActivateDurationEstimate() const; |
+ base::TimeDelta ActivateDurationEstimate() const; |
+ base::TimeDelta DrawDurationEstimate() const; |
+ |
+ void PipelineReset(); |
+ |
+ void WillBeginMainFrame(); |
+ void BeginMainFrameAborted(); |
+ void DidCommit(); |
+ void WillPrepareTiles(); |
+ void DidPrepareTiles(); |
+ void ReadyToActivate(); |
+ void WillActivate(); |
+ void DidActivate(); |
+ void WillDraw(); |
+ void DidDraw(); |
+ |
+ protected: |
+ void DidCommitInternal(base::TimeTicks commit_complete_time); |
+ |
+ void AddDrawDurationUMA(base::TimeDelta draw_duration, |
+ base::TimeDelta draw_duration_estimate); |
+ |
+ RollingTimeDeltaHistory begin_main_frame_to_commit_duration_history_; |
+ RollingTimeDeltaHistory commit_to_ready_to_activate_duration_history_; |
+ RollingTimeDeltaHistory prepare_tiles_duration_history_; |
+ RollingTimeDeltaHistory activate_duration_history_; |
+ RollingTimeDeltaHistory draw_duration_history_; |
+ |
+ base::TimeTicks begin_main_frame_sent_time_; |
+ base::TimeTicks start_prepare_tiles_time_; |
+ base::TimeTicks start_activate_time_; |
+ base::TimeTicks start_draw_time_; |
+ |
+ RenderingStatsInstrumentation* rendering_stats_instrumentation_; |
+}; |
+ |
+} // namespace cc |
+ |
+#endif // CC_SCHEDULER_COMPOSITOR_TIMING_HISTORY_H_ |