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..30455a42d3c6539efe0ae66e0c111bf8bf7f888b 100644 |
--- a/cc/output/begin_frame_args.h |
+++ b/cc/output/begin_frame_args.h |
@@ -5,6 +5,8 @@ |
#ifndef CC_OUTPUT_BEGIN_FRAME_ARGS_H_ |
#define CC_OUTPUT_BEGIN_FRAME_ARGS_H_ |
+#include <stdint.h> |
+ |
#include <memory> |
#include "base/location.h" |
@@ -63,6 +65,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, |
+ uint64_t source_id, |
+ uint64_t sequence_number, |
base::TimeTicks frame_time, |
base::TimeTicks deadline, |
base::TimeDelta interval, |
@@ -81,6 +85,8 @@ struct CC_EXPORT BeginFrameArgs { |
std::unique_ptr<base::trace_event::ConvertableToTraceFormat> AsValue() const; |
void AsValueInto(base::trace_event::TracedValue* dict) const; |
+ uint64_t source_id; |
+ uint64_t sequence_number; |
base::TimeTicks frame_time; |
base::TimeTicks deadline; |
base::TimeDelta interval; |
@@ -88,12 +94,46 @@ struct CC_EXPORT BeginFrameArgs { |
bool on_critical_path; |
private: |
- BeginFrameArgs(base::TimeTicks frame_time, |
+ BeginFrameArgs(uint64_t source_id, |
+ uint64_t sequence_number, |
+ base::TimeTicks frame_time, |
base::TimeTicks deadline, |
base::TimeDelta interval, |
BeginFrameArgsType type); |
}; |
+// Sent by a BeginFrameObserver as acknowledgment of completing a BeginFrame. |
+struct CC_EXPORT BeginFrameAck { |
+ BeginFrameAck(); |
+ BeginFrameAck(uint64_t source_id, |
+ uint64_t sequence_number, |
+ bool has_updates, |
+ uint64_t oldest_incorporated_frame, |
+ uint32_t remaining_frames); |
+ |
+ // Source identifier of the BeginFrame that is acknowledged. |
+ uint64_t source_id; |
+ |
+ // Sequence number of the BeginFrame that is acknowledged. |
+ uint64_t sequence_number; |
+ |
+ // |true| if the consumer has produced updates (e.g. sent a CompositorFrame or |
+ // damaged a surface) as part of responding to the BeginFrame. |
+ bool has_updates; |
Sami
2016/12/06 12:41:06
|oldest_incorporated_frame| is only valid if this
Eric Seckler
2016/12/06 17:33:59
No :) I updated the comment below with a note, but
Sami
2016/12/07 16:59:40
Sorry, I think the explanation is still a bit conf
Eric Seckler
2016/12/08 17:54:28
Renamed and updated the comment again after discus
|
+ |
+ // Sequence number of the oldest frame that contributed contents to the last |
+ // update the consumer sent. It describes the "staleness" of the update. |
+ // |
+ // The compositor Scheduler indicates the latest frame that both an impl and |
+ // main frame contributed to (or didn't have any updates). The |
+ // DisplayScheduler indicates the minimum oldest_incorporated_frame that all |
+ // its BeginFrameObservers acknowledged. |
+ uint64_t oldest_incorporated_frame; |
Sami
2016/12/06 12:41:06
Do we need to define an invalid/unknown value for
Eric Seckler
2016/12/06 17:33:59
My current approach to this is to consider the con
Sami
2016/12/07 16:59:40
Makes sense. If we decide to do that, let's add a
Eric Seckler
2016/12/08 17:54:28
Done, also for 1 as starting frame number.
|
+ |
+ // Number of BeginFrames queued at the observer at time of acknowledgment. |
+ uint32_t remaining_frames; |
Sami
2016/12/06 12:41:06
nit: might want to order these fields from largest
Eric Seckler
2016/12/06 17:33:59
Done.
|
+}; |
+ |
} // namespace cc |
#endif // CC_OUTPUT_BEGIN_FRAME_ARGS_H_ |