blob: e5dacb229fe79a6b3920e70cfb0f4b788a98f476 [file] [log] [blame]
// gpu/ipc/common/device_perf_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_DEVICE_PERF_INFO_MOJOM_SEND_VALIDATION_H_
#define GPU_IPC_COMMON_DEVICE_PERF_INFO_MOJOM_SEND_VALIDATION_H_
#include "gpu/ipc/common/device_perf_info.mojom-shared-internal.h"
#include "gpu/ipc/common/device_perf_info.mojom-data-view.h"
#include "mojo/public/cpp/bindings/lib/send_validation_type.h"
#include "mojo/public/cpp/bindings/lib/send_validation.h"
#include "mojo/public/cpp/bindings/lib/has_send_validation_helper.h"
namespace mojo::internal {
template <typename MaybeConstUserType>
struct HasSendValidationSerialize<::gpu::mojom::Direct3DFeatureLevel, MaybeConstUserType>
: std::false_type {};
template <typename MaybeConstUserType>
struct HasSendValidationSerialize<::gpu::mojom::HasDiscreteGpu, MaybeConstUserType>
: std::false_type {};
template <typename MaybeConstUserType, mojo::internal::SendValidation send_validation>
struct SendValidationSerializer<::gpu::mojom::DevicePerfInfoDataView, MaybeConstUserType, send_validation> {
using UserType = typename std::remove_const<MaybeConstUserType>::type;
using Traits = StructTraits<::gpu::mojom::DevicePerfInfoDataView, UserType>;
static void Serialize(
MaybeConstUserType& input,
mojo::internal::MessageFragment<::gpu::mojom::internal::DevicePerfInfo_Data>& fragment) {
if (CallIsNullIfExists<Traits>(input))
return;
fragment.Allocate();
fragment->total_physical_memory_mb = Traits::total_physical_memory_mb(input);
fragment->total_disk_space_mb = Traits::total_disk_space_mb(input);
fragment->hardware_concurrency = Traits::hardware_concurrency(input);
}
};
} // namespace mojo::internal
#endif // GPU_IPC_COMMON_DEVICE_PERF_INFO_MOJOM_SEND_VALIDATION_H_