Select image to display based on predicted display time

This commit is contained in:
Patrick Nicolas
2024-04-04 17:42:14 +02:00
parent 3bfb1adbce
commit 63f4028d83
5 changed files with 45 additions and 22 deletions
+1 -2
View File
@@ -58,7 +58,7 @@ private:
// latest frames from oldest to most recent
std::array<std::shared_ptr<shard_accumulator::blit_handle>, 3> latest_frames;
static std::optional<uint64_t> common_frame(const std::vector<accumulator_images> &, uint64_t preferred_index);
static std::optional<uint64_t> common_frame(const std::vector<accumulator_images> &, XrTime display_time);
std::shared_ptr<shard_accumulator::blit_handle> frame(std::optional<uint64_t> id);
std::vector<uint64_t> frames() const;
};
@@ -83,7 +83,6 @@ private:
std::mutex decoder_mutex;
std::optional<to_headset::video_stream_description> video_stream_description;
uint64_t next_frame; // Preferred index for next frame
std::vector<accumulator_images> decoders; // Locked by decoder_mutex
vk::raii::DescriptorPool blit_descriptor_pool = nullptr;
vk::raii::RenderPass blit_render_pass = nullptr;