5#ifndef FLUTTER_LIB_GPU_COMMAND_BUFFER_H_
6#define FLUTTER_LIB_GPU_COMMAND_BUFFER_H_
27 DEFINE_WRAPPERTYPEINFO();
52 size_t destination_offset);
66 std::shared_ptr<impeller::Context> context_;
67 std::shared_ptr<impeller::CommandBuffer> command_buffer_;
71 std::shared_ptr<impeller::BlitPass> blit_pass;
73 bool EncodeCommands()
const;
76 std::shared_ptr<impeller::BlitPass> GetOrCreateBlitPass();
78 std::vector<Encodable> encodables_;
79 std::vector<impeller::CommandBuffer::CompletionCallback>
80 completion_callbacks_;
81 bool submitted_ =
false;
103 Dart_Handle completion_callback);
109 int source_offset_in_bytes,
110 int source_length_in_bytes,
114 int destination_width,
115 int destination_height,
128 int destination_offset_in_bytes);
bool CopyBufferToTexture(DeviceBuffer &source, size_t source_offset, size_t source_length, Texture &destination, impeller::IRect destination_region, uint32_t mip_level, uint32_t slice)
~CommandBuffer() override
std::shared_ptr< impeller::CommandBuffer > GetCommandBuffer()
bool CopyTextureToTexture(Texture &source, Texture &destination, impeller::IRect source_region, impeller::IPoint destination_origin)
void AddRenderPass(std::shared_ptr< impeller::RenderPass > render_pass)
bool AddCompletionCallback(impeller::CommandBuffer::CompletionCallback completion_callback)
bool CopyTextureToBuffer(Texture &source, impeller::IRect source_region, DeviceBuffer &destination, size_t destination_offset)
std::function< void(Status)> CompletionCallback
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
FLUTTER_GPU_EXPORT Dart_Handle InternalFlutterGpu_CommandBuffer_CopyTextureToBuffer(flutter::gpu::CommandBuffer *wrapper, flutter::gpu::Texture *source, int source_x, int source_y, int source_width, int source_height, flutter::gpu::DeviceBuffer *destination, int destination_offset_in_bytes)
FLUTTER_GPU_EXPORT Dart_Handle InternalFlutterGpu_CommandBuffer_CopyBufferToTexture(flutter::gpu::CommandBuffer *wrapper, flutter::gpu::DeviceBuffer *source, int source_offset_in_bytes, int source_length_in_bytes, flutter::gpu::Texture *destination, int destination_x, int destination_y, int destination_width, int destination_height, int mip_level, int slice)
FLUTTER_GPU_EXPORT bool InternalFlutterGpu_CommandBuffer_Initialize(Dart_Handle wrapper, flutter::gpu::Context *contextWrapper)
FLUTTER_GPU_EXPORT Dart_Handle InternalFlutterGpu_CommandBuffer_Submit(flutter::gpu::CommandBuffer *wrapper, Dart_Handle completion_callback)
FLUTTER_GPU_EXPORT Dart_Handle InternalFlutterGpu_CommandBuffer_CopyTextureToTexture(flutter::gpu::CommandBuffer *wrapper, flutter::gpu::Texture *source, flutter::gpu::Texture *destination, int source_x, int source_y, int source_width, int source_height, int destination_x, int destination_y)
#define FLUTTER_GPU_EXPORT
#define FML_FRIEND_MAKE_REF_COUNTED(T)
std::shared_ptr< ContextGLES > context
std::shared_ptr< RenderPass > render_pass
std::shared_ptr< CommandBuffer > command_buffer