Add a field to GPUBuffer C struct so FFIGen can handle it

PiperOrigin-RevId: 575020084
This commit is contained in:
Sebastian Schmidt 2023-10-19 15:27:38 -07:00 committed by Copybara-Service
parent 1601073cf0
commit 305d7abec4

View File

@ -57,14 +57,17 @@ struct ImageFrame {
};
// TODO: Add GPU buffer declaration and proccessing logic for it.
struct GpuBuffer {};
struct GpuBuffer {
int width;
int height;
};
// The object to contain an image, realizes `OneOf` concept.
struct MpImage {
enum { IMAGE_FRAME, GPU_BUFFER } type;
union {
ImageFrame image_frame;
GpuBuffer gpu_buffer;
struct ImageFrame image_frame;
struct GpuBuffer gpu_buffer;
};
};