Flutter Engine
The Flutter Engine
|
#include <device_buffer_gles.h>
Public Types | |
enum class | BindingType { kArrayBuffer , kElementArrayBuffer } |
Public Member Functions | |
DeviceBufferGLES (DeviceBufferDescriptor desc, ReactorGLES::Ref reactor, std::shared_ptr< Allocation > backing_store) | |
~DeviceBufferGLES () override | |
const uint8_t * | GetBufferData () const |
void | UpdateBufferData (const std::function< void(uint8_t *, size_t length)> &update_buffer_data) |
bool | BindAndUploadDataIfNecessary (BindingType type) const |
void | Flush (std::optional< Range > range=std::nullopt) const override |
Public Member Functions inherited from impeller::DeviceBuffer | |
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 |
const DeviceBufferDescriptor & | GetDeviceBufferDescriptor () const |
virtual uint8_t * | OnGetContents () const =0 |
virtual void | Flush (std::optional< Range > range=std::nullopt) const |
virtual void | Invalidate (std::optional< Range > range=std::nullopt) const |
Additional Inherited Members | |
Static Public Member Functions inherited from impeller::DeviceBuffer | |
static BufferView | AsBufferView (std::shared_ptr< DeviceBuffer > buffer) |
Create a buffer view of this entire buffer. More... | |
Static Public Member Functions inherited from impeller::BackendCast< DeviceBufferGLES, DeviceBuffer > | |
static DeviceBufferGLES & | Cast (DeviceBuffer &base) |
static const DeviceBufferGLES & | Cast (const DeviceBuffer &base) |
static DeviceBufferGLES * | Cast (DeviceBuffer *base) |
static const DeviceBufferGLES * | Cast (const DeviceBuffer *base) |
Protected Member Functions inherited from impeller::DeviceBuffer | |
DeviceBuffer (DeviceBufferDescriptor desc) | |
virtual bool | OnCopyHostBuffer (const uint8_t *source, Range source_range, size_t offset)=0 |
Protected Attributes inherited from impeller::DeviceBuffer | |
const DeviceBufferDescriptor | desc_ |
Definition at line 18 of file device_buffer_gles.h.
|
strong |
Enumerator | |
---|---|
kArrayBuffer | |
kElementArrayBuffer |
Definition at line 34 of file device_buffer_gles.h.
impeller::DeviceBufferGLES::DeviceBufferGLES | ( | DeviceBufferDescriptor | desc, |
ReactorGLES::Ref | reactor, | ||
std::shared_ptr< Allocation > | backing_store | ||
) |
Definition at line 17 of file device_buffer_gles.cc.
|
override |
Definition at line 27 of file device_buffer_gles.cc.
bool impeller::DeviceBufferGLES::BindAndUploadDataIfNecessary | ( | BindingType | type | ) | const |
Definition at line 74 of file device_buffer_gles.cc.
|
overridevirtual |
Make any pending writes visible to the GPU.
This method must be called if the device pointer provided by [OnGetContents] is written to without using [CopyHostBuffer]. On Devices with coherent host memory, this method will not perform extra work.
If the range is not provided, the entire buffer is flushed.
Reimplemented from impeller::DeviceBuffer.
Definition at line 60 of file device_buffer_gles.cc.
const uint8_t * impeller::DeviceBufferGLES::GetBufferData | ( | ) | const |
Definition at line 113 of file device_buffer_gles.cc.
void impeller::DeviceBufferGLES::UpdateBufferData | ( | const std::function< void(uint8_t *, size_t length)> & | update_buffer_data | ) |
Definition at line 117 of file device_buffer_gles.cc.