#include <device_buffer_gles.h>
Public Types | |
enum class | BindingType { kArrayBuffer , kElementArrayBuffer , kUniformBuffer } |
Public Member Functions | |
DeviceBufferGLES (DeviceBufferDescriptor desc, std::shared_ptr< ReactorGLES > 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 |
std::optional< GLuint > | GetHandle () const |
![]() | |
virtual | ~DeviceBuffer () |
bool | CopyHostBuffer (const uint8_t *source, Range source_range, size_t offset=0u) |
const DeviceBufferDescriptor & | GetDeviceBufferDescriptor () const |
virtual void | Invalidate (std::optional< Range > range=std::nullopt) const |
Additional Inherited Members | |
![]() | |
static BufferView | AsBufferView (std::shared_ptr< DeviceBuffer > buffer) |
Create a buffer view of this entire buffer. More... | |
![]() | |
static DeviceBufferGLES & | Cast (DeviceBuffer &base) |
static const DeviceBufferGLES & | Cast (const DeviceBuffer &base) |
static DeviceBufferGLES * | Cast (DeviceBuffer *base) |
static const DeviceBufferGLES * | Cast (const DeviceBuffer *base) |
![]() | |
DeviceBuffer (DeviceBufferDescriptor desc) | |
![]() | |
const DeviceBufferDescriptor | desc_ |
Definition at line 18 of file device_buffer_gles.h.
|
strong |
Enumerator | |
---|---|
kArrayBuffer | |
kElementArrayBuffer | |
kUniformBuffer |
Definition at line 34 of file device_buffer_gles.h.
impeller::DeviceBufferGLES::DeviceBufferGLES | ( | DeviceBufferDescriptor | desc, |
std::shared_ptr< ReactorGLES > | reactor, | ||
std::shared_ptr< Allocation > | backing_store | ||
) |
Definition at line 15 of file device_buffer_gles.cc.
|
override |
Definition at line 23 of file device_buffer_gles.cc.
bool impeller::DeviceBufferGLES::BindAndUploadDataIfNecessary | ( | BindingType | type | ) | const |
Definition at line 90 of file device_buffer_gles.cc.
References impeller::kBuffer, impeller::ToTarget(), and type.
|
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 65 of file device_buffer_gles.cc.
Referenced by UpdateBufferData().
const uint8_t * impeller::DeviceBufferGLES::GetBufferData | ( | ) | const |
Definition at line 147 of file device_buffer_gles.cc.
std::optional< GLuint > impeller::DeviceBufferGLES::GetHandle | ( | ) | const |
Definition at line 57 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 151 of file device_buffer_gles.cc.
References Flush().
Referenced by impeller::BlitCopyTextureToBufferCommandGLES::Encode().