Flutter Engine
The Flutter Engine
|
An object that allocates device memory. More...
#include <allocator.h>
Public Member Functions | |
virtual | ~Allocator () |
bool | IsValid () const |
std::shared_ptr< DeviceBuffer > | CreateBuffer (const DeviceBufferDescriptor &desc) |
std::shared_ptr< Texture > | CreateTexture (const TextureDescriptor &desc) |
virtual uint16_t | MinimumBytesPerRow (PixelFormat format) const |
Minimum value for row_bytes on a Texture. The row bytes parameter of that method must be aligned to this value. More... | |
std::shared_ptr< DeviceBuffer > | CreateBufferWithCopy (const uint8_t *buffer, size_t length) |
std::shared_ptr< DeviceBuffer > | CreateBufferWithCopy (const fml::Mapping &mapping) |
virtual ISize | GetMaxTextureSizeSupported () const =0 |
virtual void | DebugTraceMemoryStatistics () const |
Write debug memory usage information to the dart timeline in debug and profile modes. More... | |
Protected Member Functions | |
Allocator () | |
virtual std::shared_ptr< DeviceBuffer > | OnCreateBuffer (const DeviceBufferDescriptor &desc)=0 |
virtual std::shared_ptr< Texture > | OnCreateTexture (const TextureDescriptor &desc)=0 |
An object that allocates device memory.
Definition at line 22 of file allocator.h.
|
virtualdefault |
|
protecteddefault |
std::shared_ptr< DeviceBuffer > impeller::Allocator::CreateBuffer | ( | const DeviceBufferDescriptor & | desc | ) |
Definition at line 44 of file allocator.cc.
std::shared_ptr< DeviceBuffer > impeller::Allocator::CreateBufferWithCopy | ( | const fml::Mapping & | mapping | ) |
Definition at line 39 of file allocator.cc.
std::shared_ptr< DeviceBuffer > impeller::Allocator::CreateBufferWithCopy | ( | const uint8_t * | buffer, |
size_t | length | ||
) |
Definition at line 18 of file allocator.cc.
std::shared_ptr< Texture > impeller::Allocator::CreateTexture | ( | const TextureDescriptor & | desc | ) |
Definition at line 49 of file allocator.cc.
|
inlinevirtual |
Write debug memory usage information to the dart timeline in debug and profile modes.
This is only supported on the Vulkan backend.
Definition at line 51 of file allocator.h.
|
pure virtual |
Implemented in impeller::testing::TestAllocator.
bool impeller::Allocator::IsValid | ( | ) | const |
|
virtual |
Minimum value for row_bytes
on a Texture. The row bytes parameter of that method must be aligned to this value.
Definition at line 69 of file allocator.cc.
|
protectedpure virtual |
Implemented in impeller::testing::TestAllocator.
|
protectedpure virtual |
Implemented in impeller::testing::TestAllocator.