class GpuAllocator

Defined at line 27 of file ../../src/ui/lib/escher/vk/gpu_allocator.h

GpuAllocator is an interface for allocating vulkan-aware blocks of memory,

and objects that are backed by said memory (i.e., buffers and images).

Vulkan implementations are not required to support large numbers of raw

memory allocations. Instead, applications are expected to allocate larger

chunks of memory, and sub-allocate from within these chunks.

GpuAllocator defines the interface that clients use to obtain

sub-allocated memory; the specific sub-allocation strategy employed is

the responsibility of concrete subclasses of GpuAllocator.

Public Members

WeakPtrFactory weak_factory_

Public Methods

GpuMemPtr AllocateMemory (vk::MemoryRequirements reqs, vk::MemoryPropertyFlags memory_property_flags)
BufferPtr AllocateBuffer (ResourceManager * manager, vk::DeviceSize size, vk::BufferUsageFlags usage_flags, vk::MemoryPropertyFlags memory_property_flags, GpuMemPtr * out_ptr)

If |out_ptr| is non-null, this buffer must be backed by a dedicated

piece of memory (i.e.,

VkMemoryDedicatedRequirements.requiresDedicatedAllocation

== true). That memory must be accessible through the GpuMem returned in

|out_ptr|.

ImagePtr AllocateImage (ResourceManager * manager, const escher::ImageInfo & info, GpuMemPtr * out_ptr)
size_t GetTotalBytesAllocated ()
size_t GetUnusedBytesAllocated ()
void GpuAllocator ()

Defined at line 29 of file ../../src/ui/lib/escher/vk/gpu_allocator.h

void ~GpuAllocator ()

Defined at line 30 of file ../../src/ui/lib/escher/vk/gpu_allocator.h

fxl::WeakPtr<GpuAllocator> GetWeakPtr ()

Defined at line 32 of file ../../src/ui/lib/escher/vk/gpu_allocator.h

void GpuAllocator (const GpuAllocator & )

Defined at line 55 of file ../../src/ui/lib/escher/vk/gpu_allocator.h

GpuAllocator & operator= (const GpuAllocator & )

Defined at line 55 of file ../../src/ui/lib/escher/vk/gpu_allocator.h