| OLD | NEW |
| 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.h" | 10 #include "cc/ipc/quads.mojom.h" |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 cc::YUVVideoDrawQuad::MaterialCast(&input); | 382 cc::YUVVideoDrawQuad::MaterialCast(&input); |
| 383 return quad->resource_offset; | 383 return quad->resource_offset; |
| 384 } | 384 } |
| 385 | 385 |
| 386 static float resource_multiplier(const cc::DrawQuad& input) { | 386 static float resource_multiplier(const cc::DrawQuad& input) { |
| 387 const cc::YUVVideoDrawQuad* quad = | 387 const cc::YUVVideoDrawQuad* quad = |
| 388 cc::YUVVideoDrawQuad::MaterialCast(&input); | 388 cc::YUVVideoDrawQuad::MaterialCast(&input); |
| 389 return quad->resource_multiplier; | 389 return quad->resource_multiplier; |
| 390 } | 390 } |
| 391 | 391 |
| 392 static uint32_t bits_per_channel(const cc::DrawQuad& input) { |
| 393 const cc::YUVVideoDrawQuad* quad = |
| 394 cc::YUVVideoDrawQuad::MaterialCast(&input); |
| 395 return quad->bits_per_channel; |
| 396 } |
| 397 |
| 392 static bool Read(cc::mojom::YUVVideoQuadStateDataView data, | 398 static bool Read(cc::mojom::YUVVideoQuadStateDataView data, |
| 393 cc::DrawQuad* out); | 399 cc::DrawQuad* out); |
| 394 }; | 400 }; |
| 395 | 401 |
| 396 struct DrawQuadWithSharedQuadState { | 402 struct DrawQuadWithSharedQuadState { |
| 397 const cc::DrawQuad* quad; | 403 const cc::DrawQuad* quad; |
| 398 bool include_sqs; | 404 bool include_sqs; |
| 399 }; | 405 }; |
| 400 | 406 |
| 401 template <> | 407 template <> |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 (*iterator.it)->shared_quad_state; | 511 (*iterator.it)->shared_quad_state; |
| 506 return dq; | 512 return dq; |
| 507 } | 513 } |
| 508 | 514 |
| 509 static size_t GetSize(const cc::QuadList& input) { return input.size(); } | 515 static size_t GetSize(const cc::QuadList& input) { return input.size(); } |
| 510 }; | 516 }; |
| 511 | 517 |
| 512 } // namespace mojo | 518 } // namespace mojo |
| 513 | 519 |
| 514 #endif // CC_IPC_QUADS_STRUCT_TRAITS_H_ | 520 #endif // CC_IPC_QUADS_STRUCT_TRAITS_H_ |
| OLD | NEW |