#include "dawn/wire/client/Buffer.h"
#include <functional>
#include <limits>
#include <string>
#include <utility>
#include "dawn/wire/BufferConsumer_impl.h"
#include "dawn/wire/WireCmd_autogen.h"
#include "dawn/wire/client/Client.h"
#include "dawn/wire/client/Device.h"
#include "dawn/wire/client/EventManager.h"
#include "partition_alloc/pointers/raw_ptr.h"
namespace dawn::wire::client {
namespace {
WGPUBuffer CreateErrorBufferOOMAtClient(Device* device, const WGPUBufferDescriptor* descriptor) { … }
}
class Buffer::MapAsyncEvent : public TrackedEvent { … };
class Buffer::MapAsyncEvent2 : public TrackedEvent { … };
WGPUBuffer Buffer::Create(Device* device, const WGPUBufferDescriptor* descriptor) { … }
WGPUBuffer Buffer::CreateError(Device* device, const WGPUBufferDescriptor* descriptor) { … }
Buffer::Buffer(const ObjectBaseParams& params,
const ObjectHandle& eventManagerHandle,
Device* device,
const WGPUBufferDescriptor* descriptor)
: … { … }
void Buffer::DeleteThis() { … }
ObjectType Buffer::GetObjectType() const { … }
void Buffer::SetFutureStatus(WGPUBufferMapAsyncStatus status) { … }
void Buffer::MapAsync(WGPUMapMode mode,
size_t offset,
size_t size,
WGPUBufferMapCallback callback,
void* userdata) { … }
WGPUFuture Buffer::MapAsyncF(WGPUMapMode mode,
size_t offset,
size_t size,
const WGPUBufferMapCallbackInfo& callbackInfo) { … }
WGPUFuture Buffer::MapAsync2(WGPUMapMode mode,
size_t offset,
size_t size,
const WGPUBufferMapCallbackInfo2& callbackInfo) { … }
WireResult Client::DoBufferMapAsyncCallback(ObjectHandle eventManager,
WGPUFuture future,
WGPUBufferMapAsyncStatus status,
WGPUMapAsyncStatus status2,
const char* message,
uint8_t userdataCount,
uint64_t readDataUpdateInfoLength,
const uint8_t* readDataUpdateInfo) { … }
void* Buffer::GetMappedRange(size_t offset, size_t size) { … }
const void* Buffer::GetConstMappedRange(size_t offset, size_t size) { … }
void Buffer::Unmap() { … }
void Buffer::Destroy() { … }
WGPUBufferUsage Buffer::GetUsage() const { … }
uint64_t Buffer::GetSize() const { … }
WGPUBufferMapState Buffer::GetMapState() const { … }
bool Buffer::IsMappedForReading() const { … }
bool Buffer::IsMappedForWriting() const { … }
bool Buffer::CheckGetMappedRangeOffsetSize(size_t offset, size_t size) const { … }
void Buffer::FreeMappedData() { … }
}