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

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

Issue 1192663005: cc: Measure compositor timing with finer granularity (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@modeTimingHistory3
Patch Set: fixes Created 5 years, 6 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CC_SCHEDULER_COMPOSITOR_TIMING_HISTORY_H_
6 #define CC_SCHEDULER_COMPOSITOR_TIMING_HISTORY_H_
7
8 #include "cc/base/rolling_time_delta_history.h"
9
10 namespace cc {
11
12 class RenderingStatsInstrumentation;
13
14 class CompositorTimingHistory {
15 public:
16 explicit CompositorTimingHistory(
17 RenderingStatsInstrumentation* rendering_stats_instrumentation);
18 ~CompositorTimingHistory();
19
20 base::TimeDelta BeginMainFrameToCommitDurationEstimate() const;
21 base::TimeDelta PrepareTilesDurationEstimate() const;
22 base::TimeDelta PrepareTilesToReadyToActivateDurationEstimate() const;
23 base::TimeDelta ActivateDurationEstimate() const;
24 base::TimeDelta DrawDurationEstimate() const;
25
26 void PipelineReset();
27
28 void WillBeginMainFrame();
29 void BeginMainFrameAborted();
30 void DidCommit();
31 void WillPrepareTiles();
32 void DidPrepareTiles();
33 void ReadyToActivate();
34 void WillActivate();
35 void DidActivate();
36 void WillDraw();
37 void DidDraw();
38
39 protected:
40 void DidCommitInternal(base::TimeTicks commit_complete_time);
41
42 void AddDrawDurationUMA(base::TimeDelta draw_duration,
43 base::TimeDelta draw_duration_estimate);
44
45 RollingTimeDeltaHistory begin_main_frame_to_commit_duration_history_;
46 RollingTimeDeltaHistory commit_to_ready_to_activate_duration_history_;
47 RollingTimeDeltaHistory prepare_tiles_duration_history_;
48 RollingTimeDeltaHistory activate_duration_history_;
49 RollingTimeDeltaHistory draw_duration_history_;
50
51 base::TimeTicks begin_main_frame_sent_time_;
52 base::TimeTicks start_prepare_tiles_time_;
53 base::TimeTicks start_activate_time_;
54 base::TimeTicks start_draw_time_;
55
56 RenderingStatsInstrumentation* rendering_stats_instrumentation_;
57 };
58
59 } // namespace cc
60
61 #endif // CC_SCHEDULER_COMPOSITOR_TIMING_HISTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698