Replace unused frames() method with empty()
This commit is contained in:
@@ -527,7 +527,7 @@ void scenes::stream::push_blit_handle(shard_accumulator * decoder, std::shared_p
|
||||
}
|
||||
|
||||
if (state_ != state::streaming and std::ranges::all_of(decoders, [](accumulator_images & i) {
|
||||
return i.alpha() or not i.frames().empty();
|
||||
return i.alpha() or not i.empty();
|
||||
}))
|
||||
{
|
||||
state_ = state::streaming;
|
||||
@@ -546,15 +546,14 @@ bool scenes::stream::accumulator_images::alpha() const
|
||||
return decoder->desc().channels == wivrn::to_headset::video_stream_description::channels_t::alpha;
|
||||
}
|
||||
|
||||
std::vector<uint64_t> scenes::stream::accumulator_images::frames() const
|
||||
bool scenes::stream::accumulator_images::empty() const
|
||||
{
|
||||
std::vector<uint64_t> result;
|
||||
for (const auto & frame: latest_frames)
|
||||
{
|
||||
if (frame)
|
||||
result.push_back(frame->feedback.frame_index);
|
||||
return false;
|
||||
}
|
||||
return result;
|
||||
return true;
|
||||
}
|
||||
|
||||
std::vector<std::shared_ptr<shard_accumulator::blit_handle>> scenes::stream::common_frame(XrTime display_time)
|
||||
|
||||
@@ -67,12 +67,12 @@ private:
|
||||
vk::DescriptorSet descriptor_set = nullptr;
|
||||
vk::raii::PipelineLayout blit_pipeline_layout = nullptr;
|
||||
vk::raii::Pipeline blit_pipeline = nullptr;
|
||||
// latest frames from oldest to most recent
|
||||
// latest frames, rolling buffer
|
||||
std::array<std::shared_ptr<wivrn::shard_accumulator::blit_handle>, image_buffer_size> latest_frames;
|
||||
|
||||
std::shared_ptr<wivrn::shard_accumulator::blit_handle> frame(uint64_t id) const;
|
||||
bool alpha() const;
|
||||
std::vector<uint64_t> frames() const;
|
||||
bool empty() const;
|
||||
};
|
||||
|
||||
wifi_lock::wifi wifi;
|
||||
|
||||
Reference in New Issue
Block a user