OLD | NEW |
---|---|
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_H_ | 5 #ifndef CC_OUTPUT_BEGIN_FRAME_H_ |
6 #define CC_OUTPUT_BEGIN_FRAME_H_ | 6 #define CC_OUTPUT_BEGIN_FRAME_H_ |
7 | 7 |
8 #include "base/time.h" | 8 #include "base/time.h" |
9 #include "cc/base/cc_export.h" | 9 #include "cc/base/cc_export.h" |
10 #include "ipc/ipc_param_traits.h" | 10 #include "ipc/ipc_param_traits.h" |
11 | 11 |
12 namespace cc { | 12 namespace cc { |
13 | 13 |
14 class CC_EXPORT BeginFrameArgs { | 14 class CC_EXPORT BeginFrameArgs { |
15 public: | 15 public: |
16 BeginFrameArgs(); | 16 BeginFrameArgs(); |
17 ~BeginFrameArgs(); | 17 ~BeginFrameArgs(); |
18 | 18 |
19 // You should be able to find all instances where a BeginFrame has been | 19 // You should be able to find all instances where a BeginFrame has been |
20 // created or propogated/modified by searching for "CreateBeginFrame". | 20 // created or propogated/modified by searching for "CreateBeginFrame". |
21 static BeginFrameArgs CreateBeginFrame(base::TimeTicks frame_time, | 21 static BeginFrameArgs CreateBeginFrame(base::TimeTicks frame_time, |
22 base::TimeTicks deadline, | 22 base::TimeTicks deadline, |
23 base::TimeDelta interval); | 23 base::TimeDelta interval); |
24 static BeginFrameArgs CreateBeginFrameForSynchronousCompositor(); | 24 static BeginFrameArgs CreateBeginFrameForSynchronousCompositor(); |
25 static BeginFrameArgs CreateBeginFrameForTesting(); | 25 static BeginFrameArgs CreateBeginFrameForTesting(); |
26 BeginFrameArgs CreateBeginFrameWithAdjustedDeadline(base::TimeDelta delta); | |
Sami
2013/06/14 15:59:20
Nit: I think calling this Create[...] is a little
brianderson
2013/06/14 18:42:36
True. I will change this to a setter for the deadl
| |
26 | 27 |
27 // This is the default delta that will be used to adjust the deadline when | 28 // This is the default delta that will be used to adjust the deadline when |
28 // proper draw-time estimations are not yet available. | 29 // proper draw-time estimations are not yet available. |
29 static base::TimeDelta DefaultDeadlineAdjustment(); | 30 static base::TimeDelta DefaultDeadlineAdjustment(); |
30 | 31 |
31 base::TimeTicks frame_time() const { | 32 base::TimeTicks frame_time() const { |
32 return frame_time_; | 33 return frame_time_; |
33 } | 34 } |
34 | 35 |
35 base::TimeTicks deadline() const { | 36 base::TimeTicks deadline() const { |
(...skipping 12 matching lines...) Expand all Loading... | |
48 base::TimeDelta interval); | 49 base::TimeDelta interval); |
49 | 50 |
50 base::TimeTicks frame_time_; | 51 base::TimeTicks frame_time_; |
51 base::TimeTicks deadline_; | 52 base::TimeTicks deadline_; |
52 base::TimeDelta interval_; | 53 base::TimeDelta interval_; |
53 }; | 54 }; |
54 | 55 |
55 } // namespace cc | 56 } // namespace cc |
56 | 57 |
57 #endif // CC_OUTPUT_BEGIN_FRAME_H_ | 58 #endif // CC_OUTPUT_BEGIN_FRAME_H_ |
OLD | NEW |