8#ifndef skgpu_graphite_DawnBuffer_DEFINED
9#define skgpu_graphite_DawnBuffer_DEFINED
11#include "webgpu/webgpu_cpp.h"
32 const wgpu::Buffer&
dawnBuffer()
const {
return fBuffer; }
37#if defined(__EMSCRIPTEN__)
41 void onMap()
override;
42 void onUnmap()
override;
44 void mapCallback(WGPUBufferMapAsyncStatus status);
46 void freeGpuData()
override;
52 void setBackendLabel(
char const* label)
override;
virtual void onAsyncMap(GpuFinishedProc, GpuFinishedContext)
bool isUnmappable() const override
static sk_sp< DawnBuffer > Make(const DawnSharedContext *, size_t size, BufferType type, AccessPattern)
const wgpu::Buffer & dawnBuffer() const
virtual void prepareForReturnToCache(const std::function< void()> &takeRef)
const SharedContext * sharedContext() const
Dart_NativeFunction function
void * GpuFinishedContext
void(*)(GpuFinishedContext finishedContext, CallbackResult) GpuFinishedProc