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 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/containers/hash_tables.h" | 12 #include "base/containers/hash_tables.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
15 #include "cc/base/cc_export.h" | |
16 | 15 |
17 namespace cc { | 16 namespace cc { |
18 | 17 |
19 // This class maintains a history of timestamps and rect IDs to communicate | 18 // This class maintains a history of timestamps and rect IDs to communicate |
20 // frame events back to Blink | 19 // frame events back to Blink |
21 // TODO(mpb): Start using this. crbug.com/442554 | 20 // TODO(mpb): Start using this. crbug.com/442554 |
22 class CC_EXPORT FrameTimingTracker { | 21 class FrameTimingTracker { |
23 public: | 22 public: |
24 struct CC_EXPORT CompositeTimingEvent { | 23 struct CompositeTimingEvent { |
25 CompositeTimingEvent(int, base::TimeTicks); | 24 CompositeTimingEvent(int, base::TimeTicks); |
26 ~CompositeTimingEvent(); | 25 ~CompositeTimingEvent(); |
27 | 26 |
28 int frame_id; | 27 int frame_id; |
29 base::TimeTicks timestamp; | 28 base::TimeTicks timestamp; |
30 }; | 29 }; |
31 | 30 |
32 using CompositeTimingSet = | 31 using CompositeTimingSet = |
33 base::hash_map<int, std::vector<CompositeTimingEvent>>; | 32 base::hash_map<int, std::vector<CompositeTimingEvent>>; |
34 | 33 |
(...skipping 19 matching lines...) Expand all Loading... |
54 FrameTimingTracker(); | 53 FrameTimingTracker(); |
55 | 54 |
56 scoped_ptr<CompositeTimingSet> composite_events_; | 55 scoped_ptr<CompositeTimingSet> composite_events_; |
57 | 56 |
58 DISALLOW_COPY_AND_ASSIGN(FrameTimingTracker); | 57 DISALLOW_COPY_AND_ASSIGN(FrameTimingTracker); |
59 }; | 58 }; |
60 | 59 |
61 } // namespace cc | 60 } // namespace cc |
62 | 61 |
63 #endif // CC_DEBUG_FRAME_TIMING_TRACKER_H_ | 62 #endif // CC_DEBUG_FRAME_TIMING_TRACKER_H_ |
OLD | NEW |