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

Side by Side Diff: cc/scheduler/compositor_timing_history.h

Issue 1213653005: Revert of cc: Measure compositor timing with finer granularity (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@modeTimingHistory3
Patch Set: Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « cc/cc_tests.gyp ('k') | cc/scheduler/compositor_timing_history.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 DrawDurationEstimate() const;
28 virtual base::TimeDelta BeginMainFrameToCommitDurationEstimate() const; 29 virtual base::TimeDelta BeginMainFrameToCommitDurationEstimate() const;
29 virtual base::TimeDelta CommitToReadyToActivateDurationEstimate() const; 30 virtual base::TimeDelta CommitToActivateDurationEstimate() const;
30 virtual base::TimeDelta PrepareTilesDurationEstimate() const;
31 virtual base::TimeDelta ActivateDurationEstimate() const;
32 virtual base::TimeDelta DrawDurationEstimate() const;
33
34 void SetRecordingEnabled(bool enabled);
35 31
36 void WillBeginMainFrame(); 32 void WillBeginMainFrame();
37 void BeginMainFrameAborted();
38 void DidCommit(); 33 void DidCommit();
39 void WillPrepareTiles(); 34 void DidActivateSyncTree();
40 void DidPrepareTiles(); 35 void DidStartDrawing();
41 void ReadyToActivate(); 36 void DidFinishDrawing();
42 void WillActivate();
43 void DidActivate();
44 void WillDraw();
45 void DidDraw();
46 37
47 protected: 38 protected:
48 virtual base::TimeTicks Now() const;
49
50 void AddDrawDurationUMA(base::TimeDelta draw_duration, 39 void AddDrawDurationUMA(base::TimeDelta draw_duration,
51 base::TimeDelta draw_duration_estimate); 40 base::TimeDelta draw_duration_estimate);
52 41
53 bool enabled_; 42 RollingTimeDeltaHistory draw_duration_history_;
54
55 RollingTimeDeltaHistory begin_main_frame_to_commit_duration_history_; 43 RollingTimeDeltaHistory begin_main_frame_to_commit_duration_history_;
56 RollingTimeDeltaHistory commit_to_ready_to_activate_duration_history_; 44 RollingTimeDeltaHistory commit_to_activate_duration_history_;
57 RollingTimeDeltaHistory prepare_tiles_duration_history_;
58 RollingTimeDeltaHistory activate_duration_history_;
59 RollingTimeDeltaHistory draw_duration_history_;
60 45
61 base::TimeTicks begin_main_frame_sent_time_; 46 base::TimeTicks begin_main_frame_sent_time_;
62 base::TimeTicks commit_time_; 47 base::TimeTicks commit_complete_time_;
63 base::TimeTicks start_prepare_tiles_time_;
64 base::TimeTicks start_activate_time_;
65 base::TimeTicks start_draw_time_; 48 base::TimeTicks start_draw_time_;
66 49
67 RenderingStatsInstrumentation* rendering_stats_instrumentation_; 50 RenderingStatsInstrumentation* rendering_stats_instrumentation_;
68 51
69 private: 52 private:
70 DISALLOW_COPY_AND_ASSIGN(CompositorTimingHistory); 53 DISALLOW_COPY_AND_ASSIGN(CompositorTimingHistory);
71 }; 54 };
72 55
73 } // namespace cc 56 } // namespace cc
74 57
75 #endif // CC_SCHEDULER_COMPOSITOR_TIMING_HISTORY_H_ 58 #endif // CC_SCHEDULER_COMPOSITOR_TIMING_HISTORY_H_
OLDNEW
« no previous file with comments | « cc/cc_tests.gyp ('k') | cc/scheduler/compositor_timing_history.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698