5 #ifndef FLUTTER_IMPELLER_RENDERER_BACKEND_GLES_DEVICE_BUFFER_GLES_H_
6 #define FLUTTER_IMPELLER_RENDERER_BACKEND_GLES_DEVICE_BUFFER_GLES_H_
20 public BackendCast<DeviceBufferGLES, DeviceBuffer> {
23 std::shared_ptr<ReactorGLES> reactor,
24 std::shared_ptr<Allocation> backing_store);
32 const std::function<
void(uint8_t*,
size_t length)>& update_buffer_data);
42 void Flush(std::optional<Range> range = std::nullopt)
const override;
47 std::shared_ptr<ReactorGLES> reactor_;
48 std::optional<std::string> label_;
50 mutable std::optional<HandleGLES> handle_;
51 mutable std::shared_ptr<Allocation> backing_store_;
52 mutable std::optional<Range> dirty_range_ = std::nullopt;
53 mutable bool initialized_ =
false;
56 uint8_t* OnGetContents()
const override;
59 bool OnCopyHostBuffer(
const uint8_t* source,
61 size_t offset)
override;
64 bool SetLabel(std::string_view label)
override;
67 bool SetLabel(std::string_view label,
Range range)
override;
void Flush(std::optional< Range > range=std::nullopt) const override
void UpdateBufferData(const std::function< void(uint8_t *, size_t length)> &update_buffer_data)
DeviceBufferGLES(DeviceBufferDescriptor desc, std::shared_ptr< ReactorGLES > reactor, std::shared_ptr< Allocation > backing_store)
bool BindAndUploadDataIfNecessary(BindingType type) const
~DeviceBufferGLES() override
const uint8_t * GetBufferData() const
std::optional< GLuint > GetHandle() const