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

Side by Side Diff: cc/ipc/quads_struct_traits.h

Issue 2541403002: cc mojo: Serialize/deserialize missed field in TextureDrawQuads (Closed)
Patch Set: Created 4 years 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/quads.mojom ('k') | cc/ipc/quads_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_QUADS_STRUCT_TRAITS_H_ 5 #ifndef CC_IPC_QUADS_STRUCT_TRAITS_H_
6 #define CC_IPC_QUADS_STRUCT_TRAITS_H_ 6 #define CC_IPC_QUADS_STRUCT_TRAITS_H_
7 7
8 #include "cc/ipc/filter_operation_struct_traits.h" 8 #include "cc/ipc/filter_operation_struct_traits.h"
9 #include "cc/ipc/filter_operations_struct_traits.h" 9 #include "cc/ipc/filter_operations_struct_traits.h"
10 #include "cc/ipc/quads.mojom-shared.h" 10 #include "cc/ipc/quads.mojom-shared.h"
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 static bool Read(cc::mojom::SurfaceQuadStateDataView data, cc::DrawQuad* out); 240 static bool Read(cc::mojom::SurfaceQuadStateDataView data, cc::DrawQuad* out);
241 }; 241 };
242 242
243 template <> 243 template <>
244 struct StructTraits<cc::mojom::TextureQuadStateDataView, cc::DrawQuad> { 244 struct StructTraits<cc::mojom::TextureQuadStateDataView, cc::DrawQuad> {
245 static uint32_t resource_id(const cc::DrawQuad& input) { 245 static uint32_t resource_id(const cc::DrawQuad& input) {
246 const cc::TextureDrawQuad* quad = cc::TextureDrawQuad::MaterialCast(&input); 246 const cc::TextureDrawQuad* quad = cc::TextureDrawQuad::MaterialCast(&input);
247 return quad->resource_id(); 247 return quad->resource_id();
248 } 248 }
249 249
250 static const gfx::Size& resource_size_in_pixels(const cc::DrawQuad& input) {
251 const cc::TextureDrawQuad* quad = cc::TextureDrawQuad::MaterialCast(&input);
252 return quad->resource_size_in_pixels();
253 }
254
250 static bool premultiplied_alpha(const cc::DrawQuad& input) { 255 static bool premultiplied_alpha(const cc::DrawQuad& input) {
251 const cc::TextureDrawQuad* quad = cc::TextureDrawQuad::MaterialCast(&input); 256 const cc::TextureDrawQuad* quad = cc::TextureDrawQuad::MaterialCast(&input);
252 return quad->premultiplied_alpha; 257 return quad->premultiplied_alpha;
253 } 258 }
254 259
255 static const gfx::PointF& uv_top_left(const cc::DrawQuad& input) { 260 static const gfx::PointF& uv_top_left(const cc::DrawQuad& input) {
256 const cc::TextureDrawQuad* quad = cc::TextureDrawQuad::MaterialCast(&input); 261 const cc::TextureDrawQuad* quad = cc::TextureDrawQuad::MaterialCast(&input);
257 return quad->uv_top_left; 262 return quad->uv_top_left;
258 } 263 }
259 264
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 dq.shared_quad_state = current_sqs; 482 dq.shared_quad_state = current_sqs;
478 return dq; 483 return dq;
479 } 484 }
480 485
481 static size_t GetSize(const cc::QuadList& input) { return input.size(); } 486 static size_t GetSize(const cc::QuadList& input) { return input.size(); }
482 }; 487 };
483 488
484 } // namespace mojo 489 } // namespace mojo
485 490
486 #endif // CC_IPC_QUADS_STRUCT_TRAITS_H_ 491 #endif // CC_IPC_QUADS_STRUCT_TRAITS_H_
OLDNEW
« no previous file with comments | « cc/ipc/quads.mojom ('k') | cc/ipc/quads_struct_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698