改结构
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
#include <magic_enum/magic_enum.hpp>
|
||||
#include <render_2D/plottable/Plottables.hpp>
|
||||
#include <render_3D/Render_3D.hpp>
|
||||
#include <render_3D/Gpu_Completion_State.hpp>
|
||||
#include <render_3D/detail/Gpu_Completion_Service.hpp>
|
||||
#include <render_common.hpp>
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
@@ -1828,7 +1828,8 @@ nlohmann::json Plot::diagnostics() const {
|
||||
{"gpu_completion_count", pipeline.gpu_completion_count},
|
||||
{"last_completed_sequence", pipeline.last_completed_sequence}
|
||||
};
|
||||
const auto gpu = gpu_completion_state();
|
||||
const auto& gpu = render_3d::detail::Gpu_Completion_Service::instance().
|
||||
read_state<render_3d::detail::Gpu_Completion_State::Base_Tag>();
|
||||
const auto milliseconds = [](std::uint64_t nanoseconds) {
|
||||
return static_cast<double>(nanoseconds) / 1'000'000.0;
|
||||
};
|
||||
@@ -1917,7 +1918,10 @@ nlohmann::json Plot::post_publish_taskflow_trace() const {
|
||||
}
|
||||
|
||||
void Plot::reset_diagnostics() {
|
||||
std::visit([](auto& scene) { scene->reset_diagnostics(); }, d->scene);
|
||||
std::visit([](auto& scene) {
|
||||
scene->template update_state<&Scene::State::event_statistics>(
|
||||
Event_Statistics_State{});
|
||||
}, d->scene);
|
||||
d->statistics_generation.fetch_add(1, std::memory_order_acq_rel);
|
||||
d->with_frame_policy([](auto& policy) { policy.reset_statistics(); });
|
||||
d->arm_tick_consumer(weak_from_this());
|
||||
|
||||
Reference in New Issue
Block a user