| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef CC_IPC_TEXTURE_MAILBOX_STRUCT_TRAITS_H_ | 5 #ifndef CC_IPC_TEXTURE_MAILBOX_STRUCT_TRAITS_H_ |
| 6 #define CC_IPC_TEXTURE_MAILBOX_STRUCT_TRAITS_H_ | 6 #define CC_IPC_TEXTURE_MAILBOX_STRUCT_TRAITS_H_ |
| 7 | 7 |
| 8 #include "cc/ipc/texture_mailbox.mojom-shared.h" | 8 #include "cc/ipc/texture_mailbox.mojom-shared.h" |
| 9 #include "cc/resources/texture_mailbox.h" | 9 #include "cc/resources/texture_mailbox.h" |
| 10 #include "gpu/ipc/common/mailbox_holder_struct_traits.h" |
| 11 #include "ui/gfx/geometry/mojo/geometry_struct_traits.h" |
| 12 #include "ui/gfx/ipc/color/gfx_param_traits.h" |
| 10 | 13 |
| 11 namespace mojo { | 14 namespace mojo { |
| 12 | 15 |
| 13 template <> | 16 template <> |
| 14 struct StructTraits<cc::mojom::TextureMailboxDataView, cc::TextureMailbox> { | 17 struct StructTraits<cc::mojom::TextureMailboxDataView, cc::TextureMailbox> { |
| 15 static const gpu::MailboxHolder& mailbox_holder( | 18 static const gpu::MailboxHolder& mailbox_holder( |
| 16 const cc::TextureMailbox& input) { | 19 const cc::TextureMailbox& input) { |
| 17 return input.mailbox_holder_; | 20 return input.mailbox_holder_; |
| 18 } | 21 } |
| 19 | 22 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 68 |
| 66 return data.ReadMailboxHolder(&out->mailbox_holder_) && | 69 return data.ReadMailboxHolder(&out->mailbox_holder_) && |
| 67 data.ReadSizeInPixels(&out->size_in_pixels_) && | 70 data.ReadSizeInPixels(&out->size_in_pixels_) && |
| 68 data.ReadColorSpace(&out->color_space_); | 71 data.ReadColorSpace(&out->color_space_); |
| 69 } | 72 } |
| 70 }; | 73 }; |
| 71 | 74 |
| 72 } // namespace mojo | 75 } // namespace mojo |
| 73 | 76 |
| 74 #endif // CC_IPC_TEXTURE_MAILBOX_STRUCT_TRAITS_H_ | 77 #endif // CC_IPC_TEXTURE_MAILBOX_STRUCT_TRAITS_H_ |
| OLD | NEW |