8#ifndef GrGpuBuffer_DEFINED
9#define GrGpuBuffer_DEFINED
34 size_t size() const final {
return fSizeInBytes; }
106 std::string_view label);
133 size_t onGpuMemorySize()
const override {
return fSizeInBytes; }
134 void onSetLabel()
override{}
135 const char* getResourceType()
const override {
return "Buffer Object"; }
static void ComputeScratchKeyForDynamicBuffer(size_t size, GrGpuBufferType, skgpu::ScratchKey *)
size_t size() const final
GrGpuBuffer(GrGpu *, size_t sizeInBytes, GrGpuBufferType, GrAccessPattern, std::string_view label)
GrGpuBufferType intendedType() const
virtual bool onUpdateData(const void *src, size_t offset, size_t size, bool preserve)=0
virtual void onUnmap(MapType)=0
virtual bool onClearToZero()=0
bool updateData(const void *src, size_t offset, size_t size, bool preserve)
virtual void onMap(MapType)=0
bool isCpuBuffer() const final
GrAccessPattern accessPattern() const