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

Side by Side Diff: cc/debug/frame_timing_tracker.h

Issue 1137823002: Pass collected frame timing events to Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Send finishTime as well for Render events. Created 5 years, 7 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 | « no previous file | cc/test/fake_layer_tree_host_client.h » ('j') | cc/trees/thread_proxy.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | cc/test/fake_layer_tree_host_client.h » ('j') | cc/trees/thread_proxy.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698