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

Side by Side Diff: cc/ipc/render_pass_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, 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_struct_traits.h ('k') | cc/ipc/returned_resource_struct_traits.h » ('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 #include "cc/ipc/render_pass_struct_traits.h" 5 #include "cc/ipc/render_pass_struct_traits.h"
6 6
7 #include "base/numerics/safe_conversions.h" 7 #include "base/numerics/safe_conversions.h"
8 #include "cc/ipc/shared_quad_state_struct_traits.h" 8 #include "cc/ipc/shared_quad_state_struct_traits.h"
9 9
10 namespace mojo { 10 namespace mojo {
11 11
12 // static 12 // static
13 bool StructTraits<cc::mojom::RenderPass, std::unique_ptr<cc::RenderPass>>::Read( 13 bool StructTraits<cc::mojom::RenderPassDataView,
14 cc::mojom::RenderPassDataView data, 14 std::unique_ptr<cc::RenderPass>>::
15 std::unique_ptr<cc::RenderPass>* out) { 15 Read(cc::mojom::RenderPassDataView data,
16 std::unique_ptr<cc::RenderPass>* out) {
16 *out = cc::RenderPass::Create(); 17 *out = cc::RenderPass::Create();
17 if (!data.ReadId(&(*out)->id) || !data.ReadOutputRect(&(*out)->output_rect) || 18 if (!data.ReadId(&(*out)->id) || !data.ReadOutputRect(&(*out)->output_rect) ||
18 !data.ReadDamageRect(&(*out)->damage_rect) || 19 !data.ReadDamageRect(&(*out)->damage_rect) ||
19 !data.ReadTransformToRootTarget(&(*out)->transform_to_root_target)) { 20 !data.ReadTransformToRootTarget(&(*out)->transform_to_root_target)) {
20 return false; 21 return false;
21 } 22 }
22 (*out)->has_transparent_background = data.has_transparent_background(); 23 (*out)->has_transparent_background = data.has_transparent_background();
23 24
24 mojo::ArrayDataView<cc::mojom::DrawQuadDataView> quads; 25 mojo::ArrayDataView<cc::mojom::DrawQuadDataView> quads;
25 data.GetQuadListDataView(&quads); 26 data.GetQuadListDataView(&quads);
(...skipping 22 matching lines...) Expand all
48 return false; 49 return false;
49 } 50 }
50 quad->shared_quad_state = last_sqs; 51 quad->shared_quad_state = last_sqs;
51 if (!quad->shared_quad_state) 52 if (!quad->shared_quad_state)
52 return false; 53 return false;
53 } 54 }
54 return true; 55 return true;
55 } 56 }
56 57
57 } // namespace mojo 58 } // namespace mojo
OLDNEW
« no previous file with comments | « cc/ipc/render_pass_struct_traits.h ('k') | cc/ipc/returned_resource_struct_traits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698