Lots of random cleanups, mostly for native_theme_win.cc:
[chromium-blink-merge.git] / cc / trees / proxy_timing_history.h
blob9230e8af04e972f75c802878dce3cedb982d8923
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.
5 #ifndef CC_TREES_PROXY_TIMING_HISTORY_H_
6 #define CC_TREES_PROXY_TIMING_HISTORY_H_
8 #include "cc/base/rolling_time_delta_history.h"
10 namespace cc {
12 class ProxyTimingHistory {
13 public:
14 ProxyTimingHistory();
15 ~ProxyTimingHistory();
17 base::TimeDelta DrawDurationEstimate() const;
18 base::TimeDelta BeginMainFrameToCommitDurationEstimate() const;
19 base::TimeDelta CommitToActivateDurationEstimate() const;
21 void DidBeginMainFrame();
22 void DidCommit();
23 void DidActivateSyncTree();
24 void DidStartDrawing();
25 // Returns draw duration.
26 base::TimeDelta DidFinishDrawing();
28 protected:
29 RollingTimeDeltaHistory draw_duration_history_;
30 RollingTimeDeltaHistory begin_main_frame_to_commit_duration_history_;
31 RollingTimeDeltaHistory commit_to_activate_duration_history_;
33 base::TimeTicks begin_main_frame_sent_time_;
34 base::TimeTicks commit_complete_time_;
35 base::TimeTicks start_draw_time_;
38 } // namespace cc
40 #endif // CC_TREES_PROXY_TIMING_HISTORY_H_