5 #ifndef FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_DEVICE_BUFFER_VK_H_
6 #define FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_DEVICE_BUFFER_VK_H_
21 std::weak_ptr<Context> context,
23 VmaAllocationInfo info,
24 bool is_host_coherent);
39 VmaAllocationInfo info = {};
44 : buffer(
std::move(p_buffer)), info(p_info) {}
47 std::swap(o.buffer, buffer);
48 std::swap(o.info, info);
56 std::weak_ptr<Context> context_;
57 UniqueResourceVKT<BufferResource> resource_;
58 bool is_host_coherent_ =
false;
61 uint8_t* OnGetContents()
const override;
64 bool OnCopyHostBuffer(
const uint8_t* source,
66 size_t offset)
override;
69 bool SetLabel(std::string_view label)
override;
72 bool SetLabel(std::string_view label, Range range)
override;
75 void Flush(std::optional<Range> range)
const override;
78 void Invalidate(std::optional<Range> range)
const override;
bool IsHostCoherent() const
DeviceBufferVK(DeviceBufferDescriptor desc, std::weak_ptr< Context > context, UniqueBufferVMA buffer, VmaAllocationInfo info, bool is_host_coherent)
~DeviceBufferVK() override
vk::Buffer GetBuffer() const
Resource< BufferView > BufferResource
fml::UniqueObject< BufferVMA, BufferVMATraits > UniqueBufferVMA