#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "gpu/command_buffer/client/dawn_client_serializer.h"
#include "base/numerics/checked_math.h"
#include "base/trace_event/trace_event.h"
#include "gpu/command_buffer/client/dawn_client_memory_transfer_service.h"
#include "gpu/command_buffer/client/shared_memory_limits.h"
#include "gpu/command_buffer/client/webgpu_cmd_helper.h"
#include "gpu/command_buffer/client/webgpu_implementation.h"
namespace gpu {
namespace webgpu {
DawnClientSerializer::DawnClientSerializer(
WebGPUImplementation* client,
WebGPUCmdHelper* helper,
DawnClientMemoryTransferService* memory_transfer_service_,
std::unique_ptr<TransferBuffer> transfer_buffer)
: … { … }
DawnClientSerializer::~DawnClientSerializer() = default;
size_t DawnClientSerializer::GetMaximumAllocationSize() const { … }
#if DCHECK_IS_ON()
void DawnClientSerializer::OnSerializeError() { … }
#endif
void* DawnClientSerializer::GetCmdSpace(size_t size) { … }
void DawnClientSerializer::Commit() { … }
void DawnClientSerializer::SetAwaitingFlush(bool awaiting_flush) { … }
void DawnClientSerializer::Disconnect() { … }
bool DawnClientSerializer::Flush() { … }
}
}