Files
Renderive/Core/architecture/Plot_Render_Context.h
T
2026-08-03 09:30:03 +08:00

36 lines
1.1 KiB
C++

#pragma once
#include "Frame_Scheduler.h"
#include <atomic>
#include <cstdint>
#include <functional>
#include <memory>
#include <memory_resource>
#include <mutex>
#include <string>
namespace renderive {
class Plot_Core;
class Timeline_Stream;
struct Plot_Render_Context {
std::atomic_bool destroying{false};
std::atomic_bool first_resize{true};
std::atomic_bool first_prepare_data{true};
std::atomic_int render_width{0};
std::atomic_int render_height{0};
std::atomic<std::uint64_t> viewport_version{0};
std::atomic<std::uint32_t> background_rgba{0xff000000u};
std::shared_ptr<Frame_Lifecycle_Observer> frame_lifecycle_observer;
std::mutex performance_update_callback_mutex;
std::function<void()> performance_update_callback;
std::mutex performance_clipboard_callback_mutex;
std::function<void(std::string)> performance_clipboard_callback;
std::atomic<std::uint64_t> performance_plot_id{0};
mutable std::mutex performance_plot_name_mutex;
std::string performance_plot_name;
std::atomic<Plot_Core*> owner{};
};
} // namespace renderive