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

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

Issue 2027223002: gpu::mojom::Mailbox: Remove unnecessary ArrayTraits IsNull/SetToNull methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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_struct_traits.h ('k') | no next file » | 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 #include "gpu/ipc/common/mailbox_struct_traits.h" 5 #include "gpu/ipc/common/mailbox_struct_traits.h"
6 6
7 namespace mojo { 7 namespace mojo {
8 8
9 // static 9 // static
10 bool ArrayTraits<MailboxName>::IsNull(const MailboxName& b) {
11 return b.data == nullptr;
12 }
13
14 // static
15 void ArrayTraits<MailboxName>::SetToNull(MailboxName* b) {
16 b->data = nullptr;
17 }
18
19 // static
20 size_t ArrayTraits<MailboxName>::GetSize(const MailboxName& b) { 10 size_t ArrayTraits<MailboxName>::GetSize(const MailboxName& b) {
21 return GL_MAILBOX_SIZE_CHROMIUM; 11 return GL_MAILBOX_SIZE_CHROMIUM;
22 } 12 }
23 13
24 // static 14 // static
25 int8_t* ArrayTraits<MailboxName>::GetData(MailboxName& b) { 15 int8_t* ArrayTraits<MailboxName>::GetData(MailboxName& b) {
26 return b.data; 16 return b.data;
27 } 17 }
28 18
29 // static 19 // static
(...skipping 27 matching lines...) Expand all
57 // static 47 // static
58 bool StructTraits<gpu::mojom::Mailbox, gpu::Mailbox>::Read( 48 bool StructTraits<gpu::mojom::Mailbox, gpu::Mailbox>::Read(
59 gpu::mojom::MailboxDataView data, 49 gpu::mojom::MailboxDataView data,
60 gpu::Mailbox* out) { 50 gpu::Mailbox* out) {
61 MailboxName mailbox_name; 51 MailboxName mailbox_name;
62 mailbox_name.data = &out->name[0]; 52 mailbox_name.data = &out->name[0];
63 return data.ReadName(&mailbox_name); 53 return data.ReadName(&mailbox_name);
64 } 54 }
65 55
66 } // namespace mojo 56 } // namespace mojo
OLDNEW
« no previous file with comments | « gpu/ipc/common/mailbox_struct_traits.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698