5 #ifndef FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_DEVICE_BUFFER_MTL_H_
6 #define FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_DEVICE_BUFFER_MTL_H_
8 #include <Metal/Metal.h>
29 const id<MTLBuffer> buffer_;
30 const MTLStorageMode storage_mode_;
34 MTLStorageMode storage_mode);
37 uint8_t* OnGetContents()
const override;
40 bool OnCopyHostBuffer(
const uint8_t* source,
45 bool SetLabel(
const std::string& label)
override;
48 bool SetLabel(
const std::string& label,
Range range)
override;
51 void Flush(std::optional<Range> range)
const override;
60 #endif // FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_DEVICE_BUFFER_MTL_H_