| 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 "cc/base/cc_export.h" | 9 #include "cc/base/cc_export.h" |
| 10 | 10 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 // 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 |
| 31 // magic numbers. | 31 // magic numbers. |
| 32 static base::TimeDelta DefaultInterval(); | 32 static base::TimeDelta DefaultInterval(); |
| 33 | 33 |
| 34 // 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 |
| 35 // send a BeginFrame that had been skipped. This only has an effect if the | 35 // send a BeginFrame that had been skipped. This only has an effect if the |
| 36 // deadline has passed, since the deadline is also used to trigger BeginFrame | 36 // deadline has passed, since the deadline is also used to trigger BeginFrame |
| 37 // retroactively. | 37 // retroactively. |
| 38 static base::TimeDelta DefaultRetroactiveBeginFramePeriod(); | 38 static base::TimeDelta DefaultRetroactiveBeginFramePeriod(); |
| 39 | 39 |
| 40 // For platforms that haven't yet moved to deadline scheduling, this will set |
| 41 // the deadline to 0. |
| 42 void AdjustDeadline(base::TimeDelta delta); |
| 43 |
| 40 bool IsValid() const { | 44 bool IsValid() const { |
| 41 return interval >= base::TimeDelta(); | 45 return interval >= base::TimeDelta(); |
| 42 } | 46 } |
| 43 | 47 |
| 44 base::TimeTicks frame_time; | 48 base::TimeTicks frame_time; |
| 45 base::TimeTicks deadline; | 49 base::TimeTicks deadline; |
| 46 base::TimeDelta interval; | 50 base::TimeDelta interval; |
| 47 | 51 |
| 48 private: | 52 private: |
| 49 BeginFrameArgs(base::TimeTicks frame_time, | 53 BeginFrameArgs(base::TimeTicks frame_time, |
| 50 base::TimeTicks deadline, | 54 base::TimeTicks deadline, |
| 51 base::TimeDelta interval); | 55 base::TimeDelta interval); |
| 52 }; | 56 }; |
| 53 | 57 |
| 54 } // namespace cc | 58 } // namespace cc |
| 55 | 59 |
| 56 #endif // CC_OUTPUT_BEGIN_FRAME_ARGS_H_ | 60 #endif // CC_OUTPUT_BEGIN_FRAME_ARGS_H_ |
| OLD | NEW |