升级
This commit is contained in:
@@ -141,26 +141,16 @@ void Renderable_Base::Impl::set_configuration(
|
||||
if (previous == value) return;
|
||||
configuration.store(value, std::memory_order_release);
|
||||
invalidate_prepare();
|
||||
notify_scene_model_dirty();
|
||||
}
|
||||
void Renderable_Base::Impl::set_visible(bool value) {
|
||||
if (visible.exchange(value, std::memory_order_acq_rel) == value) return;
|
||||
invalidate_prepare();
|
||||
notify_scene_model_dirty();
|
||||
}
|
||||
void Renderable_Base::Impl::discard_stale_frame_on_latest_data_update(
|
||||
bool enabled) noexcept {
|
||||
real_time_data_state->discard_stale_frame_on_latest_data_update.store(
|
||||
enabled, std::memory_order_release);
|
||||
}
|
||||
void Renderable_Base::Impl::notify_scene_model_dirty() {
|
||||
const auto& state = real_time_data_state;
|
||||
if (!state->attached.load(std::memory_order_acquire) ||
|
||||
!state->scene_lifetime)
|
||||
return;
|
||||
auto lease = state->scene_lifetime->acquire();
|
||||
if (lease) lease.scene().notify_model_dirty();
|
||||
}
|
||||
void Renderable_Base::Impl::build_prepare_graph(
|
||||
Renderable_Graph_Builder& builder) {
|
||||
builder.emplace("prepare", "Prepare",
|
||||
@@ -251,11 +241,9 @@ void Renderable_Base::discard_stale_frame_on_latest_data_update(
|
||||
}
|
||||
void Renderable_Base::Impl::changed() {
|
||||
invalidate_prepare();
|
||||
notify_scene_model_dirty();
|
||||
}
|
||||
void Renderable_Base::Impl::paint_changed() {
|
||||
invalidate_paint();
|
||||
notify_scene_model_dirty();
|
||||
}
|
||||
void Renderable_Base::Impl::render_graph_changed() {
|
||||
rebuild_render_graph();
|
||||
|
||||
Reference in New Issue
Block a user