Simplify decoded frame accessor
This commit is contained in:
@@ -670,17 +670,10 @@ std::array<std::shared_ptr<shard_accumulator::blit_handle>, 3> scenes::stream::c
|
|||||||
|
|
||||||
std::shared_ptr<shard_accumulator::blit_handle> scenes::stream::accumulator_images::frame(uint64_t id) const
|
std::shared_ptr<shard_accumulator::blit_handle> scenes::stream::accumulator_images::frame(uint64_t id) const
|
||||||
{
|
{
|
||||||
for (auto it = latest_frames.rbegin(); it != latest_frames.rend(); ++it)
|
auto & frame = latest_frames[id % latest_frames.size()];
|
||||||
{
|
if (frame and frame->feedback.frame_index != id)
|
||||||
if (not *it)
|
return nullptr;
|
||||||
continue;
|
return frame;
|
||||||
|
|
||||||
if ((*it)->feedback.frame_index != id)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
return *it;
|
|
||||||
}
|
|
||||||
return nullptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void scenes::stream::update_gui_position(xr::spaces controller)
|
void scenes::stream::update_gui_position(xr::spaces controller)
|
||||||
|
|||||||
Reference in New Issue
Block a user