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

Side by Side Diff: cc/ipc/begin_frame_args_struct_traits.cc

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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "cc/ipc/begin_frame_args_struct_traits.h"
6 #include "ipc/ipc_message_utils.h"
7 #include "mojo/common/common_custom_types_struct_traits.h"
8
9 namespace mojo {
10
11 // static
12 bool StructTraits<cc::mojom::BeginFrameArgsDataView, cc::BeginFrameArgs>::Read(
13 cc::mojom::BeginFrameArgsDataView data,
14 cc::BeginFrameArgs* out) {
15 if (!data.ReadFrameTime(&out->frame_time) ||
16 !data.ReadDeadline(&out->deadline) ||
17 !data.ReadInterval(&out->interval)) {
18 return false;
19 }
20 out->source_id = data.source_id();
21 out->sequence_number = data.sequence_number();
22 // TODO(eseckler): Use EnumTraits for |type|.
23 out->type = static_cast<cc::BeginFrameArgs::BeginFrameArgsType>(data.type());
24 out->on_critical_path = data.on_critical_path();
25 return true;
26 }
27
28 // static
29 bool StructTraits<cc::mojom::BeginFrameAckDataView, cc::BeginFrameAck>::Read(
30 cc::mojom::BeginFrameAckDataView data,
31 cc::BeginFrameAck* out) {
32 out->source_id = data.source_id();
33 out->sequence_number = data.sequence_number();
34 out->latest_confirmed_sequence_number =
35 data.latest_confirmed_sequence_number();
36 return true;
37 }
38
39 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698