Files
Renderive/Core/render/Render_Frame_Snapshot.h
T
2026-08-02 14:20:27 +08:00

35 lines
1.1 KiB
C++

#pragma once
#include "../architecture/Plot_Render_Context.h"
#include "../architecture/Update_Completion.h"
#include "../base/Color.h"
#include "../base/Geometry.h"
#include <atomic>
#include <cstdint>
#include <memory>
#include <memory_resource>
namespace renderive {
struct Render_Frame_Snapshot {
std::shared_ptr<Plot_Render_Context> context;
Size size;
Color background_color = Color::black();
std::uint64_t frame_time_ns{};
std::uint64_t previous_frame_time_ns{};
Frame_Lifecycle_Record* frame_metadata{};
std::pmr::vector<std::shared_ptr<Update_State>>* frame_update_states{};
mutable std::shared_ptr<Timeline_Stream_Frame_Cache> timeline_cache = std::make_shared<Timeline_Stream_Frame_Cache>();
[[nodiscard]] bool destroying() const {
return !context || context->destroying.load(std::memory_order_acquire);
}
[[nodiscard]] std::shared_ptr<const Timeline_Stream_Snapshot> timeline_snapshot(
const std::shared_ptr<Timeline_Stream>& stream,
int time_point_size,
int label_tick_interval,
bool start_coord_to_end_coord) const;
};
} // namespace renderive