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 <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 // This is the default interval to use to avoid sprinkling the code with | 75 // This is the default interval to use to avoid sprinkling the code with |
76 // magic numbers. | 76 // magic numbers. |
77 static base::TimeDelta DefaultInterval(); | 77 static base::TimeDelta DefaultInterval(); |
78 | 78 |
79 bool IsValid() const { return interval >= base::TimeDelta(); } | 79 bool IsValid() const { return interval >= base::TimeDelta(); } |
80 | 80 |
81 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> AsValue() const; | 81 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> AsValue() const; |
82 void AsValueInto(base::trace_event::TracedValue* dict) const; | 82 void AsValueInto(base::trace_event::TracedValue* dict) const; |
83 | 83 |
84 base::TimeTicks frame_time; | 84 base::TimeTicks frame_time; |
85 base::TimeTicks deadline; | 85 base::TimeTicks deadline; // TimeTicks::Max() represents an infinite value. |
86 base::TimeDelta interval; | 86 base::TimeDelta interval; |
87 BeginFrameArgsType type; | 87 BeginFrameArgsType type; |
88 bool on_critical_path; | 88 bool on_critical_path; |
| 89 bool allow_latency_optimizations; |
89 | 90 |
90 private: | 91 private: |
91 BeginFrameArgs(base::TimeTicks frame_time, | 92 BeginFrameArgs(base::TimeTicks frame_time, |
92 base::TimeTicks deadline, | 93 base::TimeTicks deadline, |
93 base::TimeDelta interval, | 94 base::TimeDelta interval, |
94 BeginFrameArgsType type); | 95 BeginFrameArgsType type); |
95 }; | 96 }; |
96 | 97 |
97 } // namespace cc | 98 } // namespace cc |
98 | 99 |
99 #endif // CC_OUTPUT_BEGIN_FRAME_ARGS_H_ | 100 #endif // CC_OUTPUT_BEGIN_FRAME_ARGS_H_ |
OLD | NEW |