Chromium Code Reviews| Index: cc/output/begin_frame_args.h |
| diff --git a/cc/output/begin_frame_args.h b/cc/output/begin_frame_args.h |
| index 78ddce99ddfcde3c4508f1d706d4b1eb205ff89f..a31f95be2dee05ca554dc91340d83ef0d391744c 100644 |
| --- a/cc/output/begin_frame_args.h |
| +++ b/cc/output/begin_frame_args.h |
| @@ -5,6 +5,7 @@ |
| #ifndef CC_OUTPUT_BEGIN_FRAME_ARGS_H_ |
| #define CC_OUTPUT_BEGIN_FRAME_ARGS_H_ |
| +#include <stdint.h> |
| #include <memory> |
| #include "base/location.h" |
| @@ -49,6 +50,9 @@ struct CC_EXPORT BeginFrameArgs { |
| }; |
| static const char* TypeToString(BeginFrameArgsType type); |
| + static const uint64_t kInvalidFrameNumber; |
|
brianderson
2016/12/15 20:30:35
constexpr?
Eric Seckler
2016/12/16 17:25:57
Done.
|
| + static const uint64_t kStartingFrameNumber; |
| + |
| // Creates an invalid set of values. |
| BeginFrameArgs(); |
| @@ -63,6 +67,8 @@ struct CC_EXPORT BeginFrameArgs { |
| // created by searching for "BeginFrameArgs::Create". |
| // The location argument should **always** be BEGINFRAME_FROM_HERE macro. |
| static BeginFrameArgs Create(CreationLocation location, |
| + uint32_t source_id, |
| + uint64_t sequence_number, |
| base::TimeTicks frame_time, |
| base::TimeTicks deadline, |
| base::TimeDelta interval, |
| @@ -81,6 +87,13 @@ struct CC_EXPORT BeginFrameArgs { |
| std::unique_ptr<base::trace_event::ConvertableToTraceFormat> AsValue() const; |
| void AsValueInto(base::trace_event::TracedValue* dict) const; |
| + // |source_id| and |sequence_number| identify a BeginFrame within a single |
| + // process and are set by the original BeginFrameSource that created the |
| + // BeginFrameArgs. When |source_id| of consecutive BeginFrameArgs changes, |
| + // observers should expect the continuity of |sequence_number| to break. |
| + uint32_t source_id; |
|
Sami
2016/12/15 13:53:00
nit: move source_id toward the end to help with pa
Eric Seckler
2016/12/15 14:59:38
okay, moved both towards the end.
|
| + uint64_t sequence_number; |
| + |
| base::TimeTicks frame_time; |
| base::TimeTicks deadline; |
| base::TimeDelta interval; |
| @@ -88,7 +101,9 @@ struct CC_EXPORT BeginFrameArgs { |
| bool on_critical_path; |
| private: |
| - BeginFrameArgs(base::TimeTicks frame_time, |
| + BeginFrameArgs(uint32_t source_id, |
| + uint64_t sequence_number, |
| + base::TimeTicks frame_time, |
| base::TimeTicks deadline, |
| base::TimeDelta interval, |
| BeginFrameArgsType type); |