OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_DEBUG_FRAME_TIMING_TRACKER_H_ | 5 #ifndef CC_DEBUG_FRAME_TIMING_TRACKER_H_ |
6 #define CC_DEBUG_FRAME_TIMING_TRACKER_H_ | 6 #define CC_DEBUG_FRAME_TIMING_TRACKER_H_ |
7 | 7 |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 public: | 23 public: |
24 struct CC_EXPORT CompositeTimingEvent { | 24 struct CC_EXPORT CompositeTimingEvent { |
25 CompositeTimingEvent(int, base::TimeTicks); | 25 CompositeTimingEvent(int, base::TimeTicks); |
26 ~CompositeTimingEvent(); | 26 ~CompositeTimingEvent(); |
27 | 27 |
28 int frame_id; | 28 int frame_id; |
29 base::TimeTicks timestamp; | 29 base::TimeTicks timestamp; |
30 }; | 30 }; |
31 | 31 |
32 using CompositeTimingSet = | 32 using CompositeTimingSet = |
33 base::hash_map<int, std::vector<CompositeTimingEvent>>; | 33 base::hash_map<int64_t, std::vector<CompositeTimingEvent>>; |
34 | 34 |
35 struct CC_EXPORT MainFrameTimingEvent { | 35 struct CC_EXPORT MainFrameTimingEvent { |
36 MainFrameTimingEvent(int frame_id, | 36 MainFrameTimingEvent(int frame_id, |
37 base::TimeTicks timestamp, | 37 base::TimeTicks timestamp, |
38 base::TimeTicks end_time); | 38 base::TimeTicks end_time); |
39 ~MainFrameTimingEvent(); | 39 ~MainFrameTimingEvent(); |
40 | 40 |
41 int frame_id; | 41 int frame_id; |
42 base::TimeTicks timestamp; | 42 base::TimeTicks timestamp; |
43 base::TimeTicks end_time; | 43 base::TimeTicks end_time; |
44 }; | 44 }; |
45 | 45 |
46 using MainFrameTimingSet = | 46 using MainFrameTimingSet = |
47 base::hash_map<int, std::vector<MainFrameTimingEvent>>; | 47 base::hash_map<int64_t, std::vector<MainFrameTimingEvent>>; |
48 | 48 |
49 static scoped_ptr<FrameTimingTracker> Create(); | 49 static scoped_ptr<FrameTimingTracker> Create(); |
50 | 50 |
51 ~FrameTimingTracker(); | 51 ~FrameTimingTracker(); |
52 | 52 |
53 // This routine takes all of the individual CompositeEvents stored in the | 53 // This routine takes all of the individual CompositeEvents stored in the |
54 // tracker and collects them by "rect_id", as in the example below. | 54 // tracker and collects them by "rect_id", as in the example below. |
55 // [ {f_id1,r_id1,t1}, {f_id2,r_id1,t2}, {f_id3,r_id2,t3} ] | 55 // [ {f_id1,r_id1,t1}, {f_id2,r_id1,t2}, {f_id3,r_id2,t3} ] |
56 // ====> | 56 // ====> |
57 // [ {r_id1,<{f_id1,t1},{f_id2,t2}>}, {r_id2,<{f_id3,t3}>} ] | 57 // [ {r_id1,<{f_id1,t1},{f_id2,t2}>}, {r_id2,<{f_id3,t3}>} ] |
(...skipping 20 matching lines...) Expand all Loading... |
78 | 78 |
79 scoped_ptr<CompositeTimingSet> composite_events_; | 79 scoped_ptr<CompositeTimingSet> composite_events_; |
80 scoped_ptr<MainFrameTimingSet> main_frame_events_; | 80 scoped_ptr<MainFrameTimingSet> main_frame_events_; |
81 | 81 |
82 DISALLOW_COPY_AND_ASSIGN(FrameTimingTracker); | 82 DISALLOW_COPY_AND_ASSIGN(FrameTimingTracker); |
83 }; | 83 }; |
84 | 84 |
85 } // namespace cc | 85 } // namespace cc |
86 | 86 |
87 #endif // CC_DEBUG_FRAME_TIMING_TRACKER_H_ | 87 #endif // CC_DEBUG_FRAME_TIMING_TRACKER_H_ |
OLD | NEW |