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

Side by Side Diff: gpu/ipc/common/mailbox_struct_traits.h

Issue 2253293002: Mojo C++ bindings: change the first template parameter of StructTraits and UnionTraits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@91_extra
Patch Set: rebase Created 4 years, 4 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
« no previous file with comments | « gpu/ipc/common/mailbox_holder_struct_traits.h ('k') | gpu/ipc/common/mailbox_struct_traits.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef GPU_IPC_COMMON_MAILBOX_STRUCT_TRAITS_H_ 5 #ifndef GPU_IPC_COMMON_MAILBOX_STRUCT_TRAITS_H_
6 #define GPU_IPC_COMMON_MAILBOX_STRUCT_TRAITS_H_ 6 #define GPU_IPC_COMMON_MAILBOX_STRUCT_TRAITS_H_
7 7
8 #include "gpu/command_buffer/common/mailbox.h" 8 #include "gpu/command_buffer/common/mailbox.h"
9 #include "gpu/ipc/common/mailbox.mojom.h" 9 #include "gpu/ipc/common/mailbox.mojom.h"
10 #include "mojo/public/cpp/bindings/array_traits.h" 10 #include "mojo/public/cpp/bindings/array_traits.h"
11 11
12 namespace mojo { 12 namespace mojo {
13 13
14 // A buffer used to read bytes directly from MailboxDataView to gpu::Mailbox 14 // A buffer used to read bytes directly from MailboxDataView to gpu::Mailbox
15 // name. 15 // name.
16 using MailboxName = CArray<int8_t>; 16 using MailboxName = CArray<int8_t>;
17 17
18 template <> 18 template <>
19 struct StructTraits<gpu::mojom::Mailbox, gpu::Mailbox> { 19 struct StructTraits<gpu::mojom::MailboxDataView, gpu::Mailbox> {
20 static MailboxName name(const gpu::Mailbox& mailbox); 20 static MailboxName name(const gpu::Mailbox& mailbox);
21 static bool Read(gpu::mojom::MailboxDataView data, gpu::Mailbox* out); 21 static bool Read(gpu::mojom::MailboxDataView data, gpu::Mailbox* out);
22 }; 22 };
23 23
24 } // namespace mojo 24 } // namespace mojo
25 25
26 #endif // GPU_IPC_COMMON_MAILBOX_STRUCT_TRAITS_H_ 26 #endif // GPU_IPC_COMMON_MAILBOX_STRUCT_TRAITS_H_
OLDNEW
« no previous file with comments | « gpu/ipc/common/mailbox_holder_struct_traits.h ('k') | gpu/ipc/common/mailbox_struct_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698