Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CC_SCHEDULER_COMPOSITOR_TIMING_HISTORY_H_ | 5 #ifndef CC_SCHEDULER_COMPOSITOR_TIMING_HISTORY_H_ |
| 6 #define CC_SCHEDULER_COMPOSITOR_TIMING_HISTORY_H_ | 6 #define CC_SCHEDULER_COMPOSITOR_TIMING_HISTORY_H_ |
| 7 | 7 |
| 8 #include "cc/base/rolling_time_delta_history.h" | 8 #include "cc/base/rolling_time_delta_history.h" |
| 9 | 9 |
| 10 namespace base { | 10 namespace base { |
| 11 namespace trace_event { | 11 namespace trace_event { |
| 12 class TracedValue; | 12 class TracedValue; |
| 13 } // namespace trace_event | 13 } // namespace trace_event |
| 14 } // namespace base | 14 } // namespace base |
| 15 | 15 |
| 16 namespace cc { | 16 namespace cc { |
| 17 | 17 |
| 18 class RenderingStatsInstrumentation; | 18 class RenderingStatsInstrumentation; |
| 19 | 19 |
| 20 class CC_EXPORT CompositorTimingHistory { | 20 class CC_EXPORT CompositorTimingHistory { |
| 21 public: | 21 public: |
| 22 explicit CompositorTimingHistory( | 22 explicit CompositorTimingHistory( |
| 23 RenderingStatsInstrumentation* rendering_stats_instrumentation); | 23 RenderingStatsInstrumentation* rendering_stats_instrumentation); |
| 24 virtual ~CompositorTimingHistory(); | 24 virtual ~CompositorTimingHistory(); |
| 25 | 25 |
| 26 void AsValueInto(base::trace_event::TracedValue* state) const; | 26 void AsValueInto(base::trace_event::TracedValue* state) const; |
| 27 | 27 |
| 28 virtual base::TimeDelta BeginMainFrameToCommitDurationEstimate() const; | |
| 29 virtual base::TimeDelta PrepareTilesDurationEstimate() const; | |
| 30 virtual base::TimeDelta PrepareTilesBeginToReadyToActivateDurationEstimate() | |
|
sunnyps
2015/06/24 23:34:12
Why is this not called CommitToReadyToActivateDura
brianderson
2015/06/24 23:46:16
See other comment.
| |
| 31 const; | |
| 32 virtual base::TimeDelta ActivateDurationEstimate() const; | |
| 28 virtual base::TimeDelta DrawDurationEstimate() const; | 33 virtual base::TimeDelta DrawDurationEstimate() const; |
| 29 virtual base::TimeDelta BeginMainFrameToCommitDurationEstimate() const; | 34 |
| 30 virtual base::TimeDelta CommitToActivateDurationEstimate() const; | 35 void SetRecordingEnabled(bool enabled); |
| 31 | 36 |
| 32 void WillBeginMainFrame(); | 37 void WillBeginMainFrame(); |
| 38 void BeginMainFrameAborted(); | |
| 33 void DidCommit(); | 39 void DidCommit(); |
| 34 void DidActivateSyncTree(); | 40 void WillPrepareTiles(); |
| 35 void DidStartDrawing(); | 41 void DidPrepareTiles(); |
| 36 void DidFinishDrawing(); | 42 void ReadyToActivate(); |
| 43 void WillActivate(); | |
| 44 void DidActivate(); | |
| 45 void WillDraw(); | |
| 46 void DidDraw(); | |
| 37 | 47 |
| 38 protected: | 48 protected: |
| 49 virtual base::TimeTicks Now() const; | |
| 50 | |
| 39 void AddDrawDurationUMA(base::TimeDelta draw_duration, | 51 void AddDrawDurationUMA(base::TimeDelta draw_duration, |
| 40 base::TimeDelta draw_duration_estimate); | 52 base::TimeDelta draw_duration_estimate); |
| 41 | 53 |
| 54 bool enabled_; | |
| 55 | |
| 56 RollingTimeDeltaHistory begin_main_frame_to_commit_duration_history_; | |
| 57 RollingTimeDeltaHistory prepare_tiles_to_ready_to_activate_duration_history_; | |
| 58 RollingTimeDeltaHistory prepare_tiles_duration_history_; | |
| 59 RollingTimeDeltaHistory activate_duration_history_; | |
| 42 RollingTimeDeltaHistory draw_duration_history_; | 60 RollingTimeDeltaHistory draw_duration_history_; |
| 43 RollingTimeDeltaHistory begin_main_frame_to_commit_duration_history_; | |
| 44 RollingTimeDeltaHistory commit_to_activate_duration_history_; | |
| 45 | 61 |
| 46 base::TimeTicks begin_main_frame_sent_time_; | 62 base::TimeTicks begin_main_frame_sent_time_; |
| 47 base::TimeTicks commit_complete_time_; | 63 base::TimeTicks start_prepare_tiles_time_; |
| 64 base::TimeTicks start_activate_time_; | |
| 48 base::TimeTicks start_draw_time_; | 65 base::TimeTicks start_draw_time_; |
| 49 | 66 |
| 50 RenderingStatsInstrumentation* rendering_stats_instrumentation_; | 67 RenderingStatsInstrumentation* rendering_stats_instrumentation_; |
| 51 | 68 |
| 52 private: | 69 private: |
| 53 DISALLOW_COPY_AND_ASSIGN(CompositorTimingHistory); | 70 DISALLOW_COPY_AND_ASSIGN(CompositorTimingHistory); |
| 54 }; | 71 }; |
| 55 | 72 |
| 56 } // namespace cc | 73 } // namespace cc |
| 57 | 74 |
| 58 #endif // CC_SCHEDULER_COMPOSITOR_TIMING_HISTORY_H_ | 75 #endif // CC_SCHEDULER_COMPOSITOR_TIMING_HISTORY_H_ |
| OLD | NEW |