| // gpu/ipc/common/vulkan_ycbcr_info.mojom-send-validation.h is auto generated by mojom_bindings_generator.py, do not edit |
| |
| // Copyright 2025 The Chromium Authors |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| #ifndef GPU_IPC_COMMON_VULKAN_YCBCR_INFO_MOJOM_SEND_VALIDATION_H_ |
| #define GPU_IPC_COMMON_VULKAN_YCBCR_INFO_MOJOM_SEND_VALIDATION_H_ |
| |
| #include "gpu/ipc/common/vulkan_ycbcr_info.mojom-shared-internal.h" |
| |
| #include "gpu/ipc/common/vulkan_ycbcr_info.mojom-data-view.h" |
| |
| #include "mojo/public/cpp/bindings/lib/send_validation_type.h" |
| #include "mojo/public/cpp/bindings/lib/send_validation.h" |
| |
| namespace mojo::internal { |
| |
| template <typename MaybeConstUserType, mojo::internal::SendValidation send_validation> |
| struct SendValidationSerializer<::gpu::mojom::VulkanYCbCrInfoDataView, MaybeConstUserType, send_validation> { |
| using UserType = typename std::remove_const<MaybeConstUserType>::type; |
| using Traits = StructTraits<::gpu::mojom::VulkanYCbCrInfoDataView, UserType>; |
| static void Serialize( |
| MaybeConstUserType& input, |
| mojo::internal::MessageFragment<::gpu::mojom::internal::VulkanYCbCrInfo_Data>& fragment) { |
| if (CallIsNullIfExists<Traits>(input)) |
| return; |
| fragment.Allocate(); |
| |
| fragment->image_format = Traits::image_format(input); |
| |
| fragment->external_format = Traits::external_format(input); |
| |
| fragment->suggested_ycbcr_model = Traits::suggested_ycbcr_model(input); |
| |
| fragment->suggested_ycbcr_range = Traits::suggested_ycbcr_range(input); |
| |
| fragment->suggested_xchroma_offset = Traits::suggested_xchroma_offset(input); |
| |
| fragment->suggested_ychroma_offset = Traits::suggested_ychroma_offset(input); |
| |
| fragment->format_features = Traits::format_features(input); |
| } |
| }; |
| |
| } // namespace mojo::internal |
| |
| #endif // GPU_IPC_COMMON_VULKAN_YCBCR_INFO_MOJOM_SEND_VALIDATION_H_ |