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/time/time.h" | 8 #include "base/time/time.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "cc/base/cc_export.h" | 10 #include "cc/base/cc_export.h" |
11 | 11 |
12 namespace cc { | 12 namespace cc { |
13 | 13 |
14 struct CC_EXPORT BeginFrameArgs { | 14 struct CC_EXPORT BeginFrameArgs { |
15 // Creates an invalid set of values. | 15 // Creates an invalid set of values. |
16 BeginFrameArgs(); | 16 BeginFrameArgs(); |
17 | 17 |
18 // You should be able to find all instances where a BeginFrame has been | 18 // You should be able to find all instances where a BeginFrame has been |
19 // created by searching for "BeginFrameArgs::Create". | 19 // created by searching for "BeginFrameArgs::Create". |
20 static BeginFrameArgs Create(base::TimeTicks frame_time, | 20 static BeginFrameArgs Create(base::TimeTicks frame_time, |
21 base::TimeTicks deadline, | 21 base::TimeTicks deadline, |
22 base::TimeDelta interval); | 22 base::TimeDelta interval); |
23 static BeginFrameArgs CreateForSynchronousCompositor(); | 23 static BeginFrameArgs CreateForSynchronousCompositor( |
| 24 base::TimeTicks now = base::TimeTicks()); |
24 | 25 |
25 // This is the default delta that will be used to adjust the deadline when | 26 // This is the default delta that will be used to adjust the deadline when |
26 // proper draw-time estimations are not yet available. | 27 // proper draw-time estimations are not yet available. |
27 static base::TimeDelta DefaultDeadlineAdjustment(); | 28 static base::TimeDelta DefaultDeadlineAdjustment(); |
28 | 29 |
29 // This is the default interval to use to avoid sprinkling the code with | 30 // This is the default interval to use to avoid sprinkling the code with |
30 // magic numbers. | 31 // magic numbers. |
31 static base::TimeDelta DefaultInterval(); | 32 static base::TimeDelta DefaultInterval(); |
32 | 33 |
33 // This is the default amount of time after the frame_time to retroactively | 34 // This is the default amount of time after the frame_time to retroactively |
(...skipping 12 matching lines...) Expand all Loading... |
46 | 47 |
47 private: | 48 private: |
48 BeginFrameArgs(base::TimeTicks frame_time, | 49 BeginFrameArgs(base::TimeTicks frame_time, |
49 base::TimeTicks deadline, | 50 base::TimeTicks deadline, |
50 base::TimeDelta interval); | 51 base::TimeDelta interval); |
51 }; | 52 }; |
52 | 53 |
53 } // namespace cc | 54 } // namespace cc |
54 | 55 |
55 #endif // CC_OUTPUT_BEGIN_FRAME_ARGS_H_ | 56 #endif // CC_OUTPUT_BEGIN_FRAME_ARGS_H_ |
OLD | NEW |