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

Unified Diff: cc/ipc/begin_frame_args_struct_traits.h

Issue 2740833005: [cc] Pass on BeginFrameAcks from CompositorEBFS through RWHVAura, DFH. (Closed)
Patch Set: address security comments Created 3 years, 9 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
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..35a9181d78d4eebe6c783b0e5f88625e4a2b4bc5 100644
--- a/cc/ipc/begin_frame_args_struct_traits.h
+++ b/cc/ipc/begin_frame_args_struct_traits.h
@@ -41,19 +41,26 @@ struct StructTraits<cc::mojom::BeginFrameArgsDataView, cc::BeginFrameArgs> {
}
static bool Read(cc::mojom::BeginFrameArgsDataView data,
- cc::BeginFrameArgs* out) {
- if (!data.ReadFrameTime(&out->frame_time) ||
- !data.ReadDeadline(&out->deadline) ||
- !data.ReadInterval(&out->interval)) {
- return false;
- }
- out->source_id = data.source_id();
- out->sequence_number = data.sequence_number();
- out->type =
- static_cast<cc::BeginFrameArgs::BeginFrameArgsType>(data.type());
- out->on_critical_path = data.on_critical_path();
- return true;
+ cc::BeginFrameArgs* out);
+};
+
+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 bool Read(cc::mojom::BeginFrameAckDataView data,
+ cc::BeginFrameAck* out);
};
} // namespace mojo

Powered by Google App Engine
This is Rietveld 408576698