blob: 2c2610f8fb4baea53b0207b06233eb645a64558c [file] [log] [blame]
// gpu/ipc/common/sync_token.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_SYNC_TOKEN_MOJOM_SEND_VALIDATION_H_
#define GPU_IPC_COMMON_SYNC_TOKEN_MOJOM_SEND_VALIDATION_H_
#include "gpu/ipc/common/sync_token.mojom-shared-internal.h"
#include "gpu/ipc/common/sync_token.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::CommandBufferNamespace, MaybeConstUserType>
: std::false_type {};
template <typename MaybeConstUserType, mojo::internal::SendValidation send_validation>
struct SendValidationSerializer<::gpu::mojom::SyncTokenDataView, MaybeConstUserType, send_validation> {
using UserType = typename std::remove_const<MaybeConstUserType>::type;
using Traits = StructTraits<::gpu::mojom::SyncTokenDataView, UserType>;
static void Serialize(
MaybeConstUserType& input,
mojo::internal::MessageFragment<::gpu::mojom::internal::SyncToken_Data>& fragment) {
if (CallIsNullIfExists<Traits>(input))
return;
fragment.Allocate();
fragment->verified_flush = Traits::verified_flush(input);
mojo::internal::Serialize<::gpu::mojom::CommandBufferNamespace>(
Traits::namespace_id(input),
&fragment->namespace_id);
fragment->command_buffer_id = Traits::command_buffer_id(input);
fragment->release_count = Traits::release_count(input);
}
};
} // namespace mojo::internal
#endif // GPU_IPC_COMMON_SYNC_TOKEN_MOJOM_SEND_VALIDATION_H_