OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "cc/ipc/transferable_resource_struct_traits.h" | 5 #include "cc/ipc/transferable_resource_struct_traits.h" |
6 #include "gpu/ipc/common/mailbox_holder_struct_traits.h" | 6 #include "gpu/ipc/common/mailbox_holder_struct_traits.h" |
7 #include "gpu/ipc/common/mailbox_struct_traits.h" | 7 #include "gpu/ipc/common/mailbox_struct_traits.h" |
8 #include "gpu/ipc/common/sync_token_struct_traits.h" | 8 #include "gpu/ipc/common/sync_token_struct_traits.h" |
9 #include "ui/gfx/geometry/mojo/geometry_struct_traits.h" | 9 #include "ui/gfx/geometry/mojo/geometry_struct_traits.h" |
10 | 10 |
11 namespace mojo { | 11 namespace mojo { |
12 | 12 |
13 // static | 13 // static |
14 bool StructTraits<cc::mojom::TransferableResource, cc::TransferableResource>:: | 14 bool StructTraits<cc::mojom::TransferableResourceDataView, |
| 15 cc::TransferableResource>:: |
15 Read(cc::mojom::TransferableResourceDataView data, | 16 Read(cc::mojom::TransferableResourceDataView data, |
16 cc::TransferableResource* out) { | 17 cc::TransferableResource* out) { |
17 if (!data.ReadSize(&out->size) || | 18 if (!data.ReadSize(&out->size) || |
18 !data.ReadMailboxHolder(&out->mailbox_holder)) | 19 !data.ReadMailboxHolder(&out->mailbox_holder)) |
19 return false; | 20 return false; |
20 out->id = data.id(); | 21 out->id = data.id(); |
21 out->format = static_cast<cc::ResourceFormat>(data.format()); | 22 out->format = static_cast<cc::ResourceFormat>(data.format()); |
22 out->filter = data.filter(); | 23 out->filter = data.filter(); |
23 out->read_lock_fences_enabled = data.read_lock_fences_enabled(); | 24 out->read_lock_fences_enabled = data.read_lock_fences_enabled(); |
24 out->is_software = data.is_software(); | 25 out->is_software = data.is_software(); |
25 out->is_overlay_candidate = data.is_overlay_candidate(); | 26 out->is_overlay_candidate = data.is_overlay_candidate(); |
26 return true; | 27 return true; |
27 } | 28 } |
28 | 29 |
29 } // namespace mojo | 30 } // namespace mojo |
OLD | NEW |