service_resolver_64: Correctly check all the bytes of the service code.
[chromium-blink-merge.git] / cc / scheduler / compositor_timing_history.h
blob41a8484596de5ae96150b268b2b46a9304980ea3
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_SCHEDULER_COMPOSITOR_TIMING_HISTORY_H_
6 #define CC_SCHEDULER_COMPOSITOR_TIMING_HISTORY_H_
8 #include "cc/base/rolling_time_delta_history.h"
10 namespace base {
11 namespace trace_event {
12 class TracedValue;
13 } // namespace trace_event
14 } // namespace base
16 namespace cc {
18 class RenderingStatsInstrumentation;
20 class CC_EXPORT CompositorTimingHistory {
21 public:
22 explicit CompositorTimingHistory(
23 RenderingStatsInstrumentation* rendering_stats_instrumentation);
24 virtual ~CompositorTimingHistory();
26 void AsValueInto(base::trace_event::TracedValue* state) const;
28 virtual base::TimeDelta DrawDurationEstimate() const;
29 virtual base::TimeDelta BeginMainFrameToCommitDurationEstimate() const;
30 virtual base::TimeDelta CommitToActivateDurationEstimate() const;
32 void WillBeginMainFrame();
33 void DidCommit();
34 void DidActivateSyncTree();
35 void DidStartDrawing();
36 void DidFinishDrawing();
38 protected:
39 void AddDrawDurationUMA(base::TimeDelta draw_duration,
40 base::TimeDelta draw_duration_estimate);
42 RollingTimeDeltaHistory draw_duration_history_;
43 RollingTimeDeltaHistory begin_main_frame_to_commit_duration_history_;
44 RollingTimeDeltaHistory commit_to_activate_duration_history_;
46 base::TimeTicks begin_main_frame_sent_time_;
47 base::TimeTicks commit_complete_time_;
48 base::TimeTicks start_draw_time_;
50 RenderingStatsInstrumentation* rendering_stats_instrumentation_;
52 private:
53 DISALLOW_COPY_AND_ASSIGN(CompositorTimingHistory);
56 } // namespace cc
58 #endif // CC_SCHEDULER_COMPOSITOR_TIMING_HISTORY_H_