| Index: gpu/ipc/common/mailbox_holder_struct_traits.h
|
| diff --git a/gpu/ipc/common/mailbox_holder_struct_traits.h b/gpu/ipc/common/mailbox_holder_struct_traits.h
|
| index 6f6f1464bfc2bcef84004275243fd09937dabdbb..5f000f5a796ad951d5626be336cd6cca5b627cb5 100644
|
| --- a/gpu/ipc/common/mailbox_holder_struct_traits.h
|
| +++ b/gpu/ipc/common/mailbox_holder_struct_traits.h
|
| @@ -12,11 +12,11 @@ namespace mojo {
|
|
|
| template <>
|
| struct StructTraits<gpu::mojom::MailboxHolder, gpu::MailboxHolder> {
|
| - static gpu::Mailbox mailbox(const gpu::MailboxHolder& holder) {
|
| + static const gpu::Mailbox& mailbox(const gpu::MailboxHolder& holder) {
|
| return holder.mailbox;
|
| }
|
|
|
| - static gpu::SyncToken sync_token(const gpu::MailboxHolder& holder) {
|
| + static const gpu::SyncToken& sync_token(const gpu::MailboxHolder& holder) {
|
| return holder.sync_token;
|
| }
|
|
|
| @@ -26,11 +26,10 @@ struct StructTraits<gpu::mojom::MailboxHolder, gpu::MailboxHolder> {
|
|
|
| static bool Read(gpu::mojom::MailboxHolderDataView data,
|
| gpu::MailboxHolder* out) {
|
| - gpu::Mailbox mailbox;
|
| - gpu::SyncToken sync_token;
|
| - if (!data.ReadMailbox(&mailbox) || !data.ReadSyncToken(&sync_token))
|
| + if (!data.ReadMailbox(&out->mailbox) ||
|
| + !data.ReadSyncToken(&out->sync_token))
|
| return false;
|
| - *out = gpu::MailboxHolder(mailbox, sync_token, data.texture_target());
|
| + out->texture_target = data.texture_target();
|
| return true;
|
| }
|
| };
|
|
|