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

Side by Side Diff: cc/ipc/transferable_resource_struct_traits.cc

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, 3 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
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 "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
OLDNEW
« no previous file with comments | « cc/ipc/transferable_resource_struct_traits.h ('k') | chrome/browser/media/router/mojo/media_router_struct_traits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698