5 #ifndef FLUTTER_IMPELLER_RENDERER_BACKEND_GLES_DEVICE_BUFFER_GLES_H_
6 #define FLUTTER_IMPELLER_RENDERER_BACKEND_GLES_DEVICE_BUFFER_GLES_H_
21 public BackendCast<DeviceBufferGLES, DeviceBuffer> {
24 std::shared_ptr<ReactorGLES>
reactor,
25 std::unique_ptr<Allocation> backing_store);
33 const std::function<
void(uint8_t*,
size_t length)>& update_buffer_data);
43 void Flush(std::optional<Range> range = std::nullopt)
const override;
48 std::shared_ptr<ReactorGLES> reactor_;
49 std::optional<std::string> label_;
51 mutable std::optional<HandleGLES> handle_;
52 mutable std::unique_ptr<Allocation> backing_store_;
56 mutable Mutex dirty_range_mutex_;
57 mutable std::optional<Range> dirty_range_
58 IPLR_GUARDED_BY(dirty_range_mutex_) = std::nullopt;
59 mutable bool initialized_ =
false;
62 uint8_t* OnGetContents()
const override;
65 bool OnCopyHostBuffer(
const uint8_t* source,
67 size_t offset)
override;
70 bool SetLabel(std::string_view label)
override;
73 bool SetLabel(std::string_view label,
Range range)
override;
void Flush(std::optional< Range > range=std::nullopt) const override
DeviceBufferGLES(DeviceBufferDescriptor desc, std::shared_ptr< ReactorGLES > reactor, std::unique_ptr< Allocation > backing_store)
void UpdateBufferData(const std::function< void(uint8_t *, size_t length)> &update_buffer_data)
bool BindAndUploadDataIfNecessary(BindingType type) const
~DeviceBufferGLES() override
const uint8_t * GetBufferData() const
std::optional< GLuint > GetHandle() const
std::shared_ptr< ReactorGLES > reactor