struct QueueBufferOutput : public Flattenable<QueueBufferOutput> {
QueueBufferOutput() = default;
// Moveable.
QueueBufferOutput(QueueBufferOutput&& src) = default;
QueueBufferOutput& operator=(QueueBufferOutput&& src) = default;
// Not copyable.
QueueBufferOutput(const QueueBufferOutput& src) = delete;
QueueBufferOutput& operator=(const QueueBufferOutput& src) = delete;
// Flattenable protocol
static constexpr size_t minFlattenedSize();
size_t getFlattenedSize() const;
size_t getFdCount() const;
status_t flatten(void*& buffer, size_t& size, int*& fds, size_t& count) const;
status_t unflatten(void const*& buffer, size_t& size, int const*& fds, size_t& count);
uint32_t width{0};
uint32_t height{0};
uint32_t transformHint{0};
uint32_t numPendingBuffers{0};
uint64_t nextFrameNumber{0};
FrameEventHistoryDelta frameTimestamps;
bool bufferReplaced{false};
int maxBufferCount{0};
};
QueueBufferOutput 定义在 IGraphicBufferProducer.h
中,它是 BufferQueueProducer::queueBuffer() 的输出。