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

Side by Side Diff: cc/ipc/render_pass_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 | « cc/ipc/render_pass_id_struct_traits.h ('k') | cc/ipc/render_pass_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 CC_IPC_RENDER_PASS_STRUCT_TRAITS_H_ 5 #ifndef CC_IPC_RENDER_PASS_STRUCT_TRAITS_H_
6 #define CC_IPC_RENDER_PASS_STRUCT_TRAITS_H_ 6 #define CC_IPC_RENDER_PASS_STRUCT_TRAITS_H_
7 7
8 #include "cc/ipc/quads_struct_traits.h" 8 #include "cc/ipc/quads_struct_traits.h"
9 #include "cc/ipc/render_pass.mojom.h" 9 #include "cc/ipc/render_pass.mojom.h"
10 #include "cc/ipc/render_pass_id_struct_traits.h" 10 #include "cc/ipc/render_pass_id_struct_traits.h"
11 #include "cc/quads/render_pass.h" 11 #include "cc/quads/render_pass.h"
12 #include "ui/gfx/mojo/transform_struct_traits.h" 12 #include "ui/gfx/mojo/transform_struct_traits.h"
13 13
14 namespace mojo { 14 namespace mojo {
15 15
16 template <> 16 template <>
17 struct StructTraits<cc::mojom::RenderPass, std::unique_ptr<cc::RenderPass>> { 17 struct StructTraits<cc::mojom::RenderPassDataView,
18 std::unique_ptr<cc::RenderPass>> {
18 static const cc::RenderPassId& id( 19 static const cc::RenderPassId& id(
19 const std::unique_ptr<cc::RenderPass>& input) { 20 const std::unique_ptr<cc::RenderPass>& input) {
20 return input->id; 21 return input->id;
21 } 22 }
22 23
23 static const gfx::Rect& output_rect( 24 static const gfx::Rect& output_rect(
24 const std::unique_ptr<cc::RenderPass>& input) { 25 const std::unique_ptr<cc::RenderPass>& input) {
25 return input->output_rect; 26 return input->output_rect;
26 } 27 }
27 28
(...skipping 17 matching lines...) Expand all
45 return input->quad_list; 46 return input->quad_list;
46 } 47 }
47 48
48 static bool Read(cc::mojom::RenderPassDataView data, 49 static bool Read(cc::mojom::RenderPassDataView data,
49 std::unique_ptr<cc::RenderPass>* out); 50 std::unique_ptr<cc::RenderPass>* out);
50 }; 51 };
51 52
52 } // namespace mojo 53 } // namespace mojo
53 54
54 #endif // CC_IPC_RENDER_PASS_STRUCT_TRAITS_H_ 55 #endif // CC_IPC_RENDER_PASS_STRUCT_TRAITS_H_
OLDNEW
« no previous file with comments | « cc/ipc/render_pass_id_struct_traits.h ('k') | cc/ipc/render_pass_struct_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698