kopia lustrzana https://gitlab.com/sane-project/backends
genesys: Emit single vtable of ImagePipelineNodeCallableSource
rodzic
c8f2a815c0
commit
60b6465115
|
@ -59,6 +59,14 @@ std::size_t ImagePipelineNodeBytesSource::consume_remaining_bytes(std::size_t by
|
|||
return bytes;
|
||||
}
|
||||
|
||||
bool ImagePipelineNodeCallableSource::get_next_row_data(std::uint8_t* out_data)
|
||||
{
|
||||
bool got_data = producer_(get_row_bytes(), out_data);
|
||||
if (!got_data)
|
||||
eof_ = true;
|
||||
return got_data;
|
||||
}
|
||||
|
||||
ImagePipelineNodeBufferedCallableSource::ImagePipelineNodeBufferedCallableSource(
|
||||
std::size_t width, std::size_t height, PixelFormat format, std::size_t input_batch_size,
|
||||
ProducerCallback producer) :
|
||||
|
|
|
@ -105,13 +105,7 @@ public:
|
|||
|
||||
bool eof() const override { return eof_; }
|
||||
|
||||
bool get_next_row_data(std::uint8_t* out_data) override
|
||||
{
|
||||
bool got_data = producer_(get_row_bytes(), out_data);
|
||||
if (!got_data)
|
||||
eof_ = true;
|
||||
return got_data;
|
||||
}
|
||||
bool get_next_row_data(std::uint8_t* out_data) override;
|
||||
|
||||
private:
|
||||
ProducerCallback producer_;
|
||||
|
|
Ładowanie…
Reference in New Issue