#include <device_buffer.h>
Public Member Functions | |
| virtual | ~DeviceBuffer () |
| bool | CopyHostBuffer (const uint8_t *source, Range source_range, size_t offset=0u) |
| virtual bool | SetLabel (const std::string &label)=0 |
| virtual bool | SetLabel (const std::string &label, Range range)=0 |
| BufferView | AsBufferView () const |
| virtual std::shared_ptr< Texture > | AsTexture (Allocator &allocator, const TextureDescriptor &descriptor, uint16_t row_bytes) const |
| std::shared_ptr< const DeviceBuffer > | GetDeviceBuffer (Allocator &allocator) const |
| const DeviceBufferDescriptor & | GetDeviceBufferDescriptor () const |
| virtual uint8_t * | OnGetContents () const =0 |
Public Member Functions inherited from impeller::Buffer | |
| virtual | ~Buffer () |
Protected Member Functions | |
| DeviceBuffer (DeviceBufferDescriptor desc) | |
| virtual bool | OnCopyHostBuffer (const uint8_t *source, Range source_range, size_t offset)=0 |
Protected Attributes | |
| const DeviceBufferDescriptor | desc_ |
Definition at line 20 of file device_buffer.h.
|
virtualdefault |
|
explicitprotected |
Definition at line 9 of file device_buffer.cc.
| BufferView impeller::DeviceBuffer::AsBufferView | ( | ) | const |
Definition at line 19 of file device_buffer.cc.
References impeller::BufferView::buffer, impeller::BufferView::contents, desc_, OnGetContents(), impeller::BufferView::range, and impeller::DeviceBufferDescriptor::size.
|
virtual |
Definition at line 27 of file device_buffer.cc.
References impeller::Allocator::CreateTexture(), desc_, OnGetContents(), and impeller::DeviceBufferDescriptor::size.
| bool impeller::DeviceBuffer::CopyHostBuffer | ( | const uint8_t * | source, |
| Range | source_range, | ||
| size_t | offset = 0u |
||
| ) |
Definition at line 46 of file device_buffer.cc.
References desc_, impeller::kHostVisible, impeller::Range::length, OnCopyHostBuffer(), impeller::DeviceBufferDescriptor::size, and impeller::DeviceBufferDescriptor::storage_mode.
|
virtual |
Implements impeller::Buffer.
Definition at line 14 of file device_buffer.cc.
| const DeviceBufferDescriptor & impeller::DeviceBuffer::GetDeviceBufferDescriptor | ( | ) | const |
|
protectedpure virtual |
Referenced by CopyHostBuffer().
|
pure virtual |
Referenced by AsBufferView(), and AsTexture().
|
pure virtual |
|
pure virtual |
|
protected |
Definition at line 49 of file device_buffer.h.
Referenced by AsBufferView(), AsTexture(), CopyHostBuffer(), and GetDeviceBufferDescriptor().