OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_OUTPUT_BEGIN_FRAME_ARGS_H_ | 5 #ifndef CC_OUTPUT_BEGIN_FRAME_ARGS_H_ |
6 #define CC_OUTPUT_BEGIN_FRAME_ARGS_H_ | 6 #define CC_OUTPUT_BEGIN_FRAME_ARGS_H_ |
7 | 7 |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
11 #include "base/values.h" | 11 #include "base/values.h" |
12 #include "cc/base/cc_export.h" | 12 #include "cc/base/cc_export.h" |
13 | 13 |
14 namespace base { | 14 namespace base { |
15 namespace trace_event { | 15 namespace debug { |
16 class ConvertableToTraceFormat; | 16 class ConvertableToTraceFormat; |
17 class TracedValue; | 17 class TracedValue; |
18 } | 18 } |
19 | |
20 // TODO(ssid): remove these aliases after the tracing clients are moved to the | |
21 // new trace_event namespace. See crbug.com/451032. ETA: March 2015 | |
22 namespace debug { | |
23 using ::base::trace_event::ConvertableToTraceFormat; | |
24 using ::base::trace_event::TracedValue; | |
25 } | 19 } |
26 } // namespace base | |
27 | 20 |
28 /** | 21 /** |
29 * In debug builds we trace the creation origin of BeginFrameArgs objects. We | 22 * In debug builds we trace the creation origin of BeginFrameArgs objects. We |
30 * reuse the tracked_objects::Location system to do that. | 23 * reuse the tracked_objects::Location system to do that. |
31 * | 24 * |
32 * However, in release builds we don't want this as it doubles the size of the | 25 * However, in release builds we don't want this as it doubles the size of the |
33 * BeginFrameArgs object. As well it adds a number of largish strings to the | 26 * BeginFrameArgs object. As well it adds a number of largish strings to the |
34 * binary. Despite the argument being unused, most compilers are unable to | 27 * binary. Despite the argument being unused, most compilers are unable to |
35 * optimise it away even when unused. Instead we use the BEGINFRAME_FROM_HERE | 28 * optimise it away even when unused. Instead we use the BEGINFRAME_FROM_HERE |
36 * macro to prevent the data even getting referenced. | 29 * macro to prevent the data even getting referenced. |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 private: | 88 private: |
96 BeginFrameArgs(base::TimeTicks frame_time, | 89 BeginFrameArgs(base::TimeTicks frame_time, |
97 base::TimeTicks deadline, | 90 base::TimeTicks deadline, |
98 base::TimeDelta interval, | 91 base::TimeDelta interval, |
99 BeginFrameArgsType type); | 92 BeginFrameArgsType type); |
100 }; | 93 }; |
101 | 94 |
102 } // namespace cc | 95 } // namespace cc |
103 | 96 |
104 #endif // CC_OUTPUT_BEGIN_FRAME_ARGS_H_ | 97 #endif // CC_OUTPUT_BEGIN_FRAME_ARGS_H_ |
OLD | NEW |