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" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 tracked_objects::Location created_from; | 57 tracked_objects::Location created_from; |
58 #endif | 58 #endif |
59 | 59 |
60 // You should be able to find all instances where a BeginFrame has been | 60 // You should be able to find all instances where a BeginFrame has been |
61 // created by searching for "BeginFrameArgs::Create". | 61 // created by searching for "BeginFrameArgs::Create". |
62 // The location argument should **always** be BEGINFRAME_FROM_HERE macro. | 62 // The location argument should **always** be BEGINFRAME_FROM_HERE macro. |
63 static BeginFrameArgs Create(CreationLocation location, | 63 static BeginFrameArgs Create(CreationLocation location, |
64 base::TimeTicks frame_time, | 64 base::TimeTicks frame_time, |
65 base::TimeTicks deadline, | 65 base::TimeTicks deadline, |
66 base::TimeDelta interval, | 66 base::TimeDelta interval, |
67 BeginFrameArgsType type); | 67 BeginFrameArgsType type, |
| 68 bool on_critical_path); |
68 | 69 |
69 // This is the default delta that will be used to adjust the deadline when | 70 // This is the default delta that will be used to adjust the deadline when |
70 // proper draw-time estimations are not yet available. | 71 // proper draw-time estimations are not yet available. |
71 static base::TimeDelta DefaultEstimatedParentDrawTime(); | 72 static base::TimeDelta DefaultEstimatedParentDrawTime(); |
72 | 73 |
73 // This is the default interval to use to avoid sprinkling the code with | 74 // This is the default interval to use to avoid sprinkling the code with |
74 // magic numbers. | 75 // magic numbers. |
75 static base::TimeDelta DefaultInterval(); | 76 static base::TimeDelta DefaultInterval(); |
76 | 77 |
77 bool IsValid() const { return interval >= base::TimeDelta(); } | 78 bool IsValid() const { return interval >= base::TimeDelta(); } |
78 | 79 |
79 scoped_refptr<base::trace_event::ConvertableToTraceFormat> AsValue() const; | 80 scoped_refptr<base::trace_event::ConvertableToTraceFormat> AsValue() const; |
80 void AsValueInto(base::trace_event::TracedValue* dict) const; | 81 void AsValueInto(base::trace_event::TracedValue* dict) const; |
81 | 82 |
82 base::TimeTicks frame_time; | 83 base::TimeTicks frame_time; |
83 base::TimeTicks deadline; | 84 base::TimeTicks deadline; |
84 base::TimeDelta interval; | 85 base::TimeDelta interval; |
85 BeginFrameArgsType type; | 86 BeginFrameArgsType type; |
| 87 bool on_critical_path; |
86 | 88 |
87 private: | 89 private: |
88 BeginFrameArgs(base::TimeTicks frame_time, | 90 BeginFrameArgs(base::TimeTicks frame_time, |
89 base::TimeTicks deadline, | 91 base::TimeTicks deadline, |
90 base::TimeDelta interval, | 92 base::TimeDelta interval, |
91 BeginFrameArgsType type); | 93 BeginFrameArgsType type, |
| 94 bool on_critical_path); |
92 }; | 95 }; |
93 | 96 |
94 } // namespace cc | 97 } // namespace cc |
95 | 98 |
96 #endif // CC_OUTPUT_BEGIN_FRAME_ARGS_H_ | 99 #endif // CC_OUTPUT_BEGIN_FRAME_ARGS_H_ |
OLD | NEW |