| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 BeginFrameArgsType type); | 68 BeginFrameArgsType type); |
| 69 | 69 |
| 70 // 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 |
| 71 // proper draw-time estimations are not yet available. | 71 // proper draw-time estimations are not yet available. |
| 72 static base::TimeDelta DefaultEstimatedParentDrawTime(); | 72 static base::TimeDelta DefaultEstimatedParentDrawTime(); |
| 73 | 73 |
| 74 // 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 |
| 75 // magic numbers. | 75 // magic numbers. |
| 76 static base::TimeDelta DefaultInterval(); | 76 static base::TimeDelta DefaultInterval(); |
| 77 | 77 |
| 78 // This is the default amount of time after the frame_time to retroactively | |
| 79 // send a BeginFrame that had been skipped. This only has an effect if the | |
| 80 // deadline has passed, since the deadline is also used to trigger BeginFrame | |
| 81 // retroactively. | |
| 82 static base::TimeDelta DefaultRetroactiveBeginFramePeriod(); | |
| 83 | |
| 84 bool IsValid() const { return interval >= base::TimeDelta(); } | 78 bool IsValid() const { return interval >= base::TimeDelta(); } |
| 85 | 79 |
| 86 scoped_refptr<base::debug::ConvertableToTraceFormat> AsValue() const; | 80 scoped_refptr<base::debug::ConvertableToTraceFormat> AsValue() const; |
| 87 void AsValueInto(base::debug::TracedValue* dict) const; | 81 void AsValueInto(base::debug::TracedValue* dict) const; |
| 88 | 82 |
| 89 base::TimeTicks frame_time; | 83 base::TimeTicks frame_time; |
| 90 base::TimeTicks deadline; | 84 base::TimeTicks deadline; |
| 91 base::TimeDelta interval; | 85 base::TimeDelta interval; |
| 92 BeginFrameArgsType type; | 86 BeginFrameArgsType type; |
| 93 | 87 |
| 94 private: | 88 private: |
| 95 BeginFrameArgs(base::TimeTicks frame_time, | 89 BeginFrameArgs(base::TimeTicks frame_time, |
| 96 base::TimeTicks deadline, | 90 base::TimeTicks deadline, |
| 97 base::TimeDelta interval, | 91 base::TimeDelta interval, |
| 98 BeginFrameArgsType type); | 92 BeginFrameArgsType type); |
| 99 }; | 93 }; |
| 100 | 94 |
| 101 } // namespace cc | 95 } // namespace cc |
| 102 | 96 |
| 103 #endif // CC_OUTPUT_BEGIN_FRAME_ARGS_H_ | 97 #endif // CC_OUTPUT_BEGIN_FRAME_ARGS_H_ |
| OLD | NEW |