Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1248)

Unified Diff: cc/ipc/begin_frame_args_struct_traits.h

Issue 2591013004: [cc] Add and use BeginFrameAck for DidFinishFrame. (Closed)
Patch Set: make time advancement explicit in DisplaySchedulerTests. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/ipc/begin_frame_args.typemap ('k') | cc/ipc/cc_param_traits_macros.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/ipc/begin_frame_args_struct_traits.h
diff --git a/cc/ipc/begin_frame_args_struct_traits.h b/cc/ipc/begin_frame_args_struct_traits.h
index 4d813395c282743b2c57f38985b3572113db3993..b189414b3b72af14914cf5e8efb2a5928e8cfc1b 100644
--- a/cc/ipc/begin_frame_args_struct_traits.h
+++ b/cc/ipc/begin_frame_args_struct_traits.h
@@ -56,6 +56,41 @@ struct StructTraits<cc::mojom::BeginFrameArgsDataView, cc::BeginFrameArgs> {
}
};
+template <>
+struct StructTraits<cc::mojom::BeginFrameAckDataView, cc::BeginFrameAck> {
+ static uint64_t sequence_number(const cc::BeginFrameAck& ack) {
+ return ack.sequence_number;
+ }
+
+ static uint64_t latest_confirmed_sequence_number(
+ const cc::BeginFrameAck& ack) {
+ return ack.latest_confirmed_sequence_number;
+ }
+
+ static uint32_t source_id(const cc::BeginFrameAck& ack) {
+ return ack.source_id;
+ }
+
+ static uint32_t remaining_frames(const cc::BeginFrameAck& ack) {
+ return ack.remaining_frames;
+ }
+
+ static bool has_damage(const cc::BeginFrameAck& ack) {
+ return ack.has_damage;
+ }
+
+ static bool Read(cc::mojom::BeginFrameAckDataView data,
+ cc::BeginFrameAck* out) {
dcheng 2017/01/05 06:49:54 Nit: Read() methods should generally out-of-lined,
Eric Seckler 2017/01/06 16:08:51 will do when we add it back in a later CL :)
+ out->source_id = data.source_id();
+ out->sequence_number = data.sequence_number();
+ out->latest_confirmed_sequence_number =
+ data.latest_confirmed_sequence_number();
+ out->remaining_frames = data.remaining_frames();
+ out->has_damage = data.has_damage();
+ return true;
+ }
+};
+
} // namespace mojo
#endif // CC_IPC_BEGIN_FRAME_ARGS_STRUCT_TRAITS_H_
« no previous file with comments | « cc/ipc/begin_frame_args.typemap ('k') | cc/ipc/cc_param_traits_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698