builder 和 运行时修改隔离开

This commit is contained in:
2026-08-13 11:25:38 +08:00
parent 9e598a0318
commit 4a48e62aea
57 changed files with 1512 additions and 2592 deletions
+5 -7
View File
@@ -23,8 +23,8 @@ void Renderable_Observer::observe_state(Renderable_Observer_Event event,
observation_.publish_count = publish_count;
}
Renderable::Renderable(::Scene_Base& scene, bool cache_enabled)
: ::Renderable_Base(scene, {.cache_enabled = cache_enabled}) {}
Renderable::Renderable(bool cache_enabled)
: ::Renderable_Base({.cache_enabled = cache_enabled}) {}
Renderable::~Renderable() = default;
@@ -35,9 +35,7 @@ Renderable_Cache_Mode Renderable::get_cache_mode() const noexcept {
}
void Renderable::set_cache_mode(Renderable_Cache_Mode mode) {
scene().set_renderable_configuration(
shared_from_this(),
{.cache_enabled = mode == Renderable_Cache_Mode::Local_Pixel});
set_configuration({.cache_enabled = mode == Renderable_Cache_Mode::Local_Pixel});
}
std::string Renderable::object_name() const {
@@ -106,12 +104,12 @@ Renderable_Graph_Builder::Task Renderable::add_paint_task(
void Renderable::changed() noexcept {
invalidate_prepare();
scene().notify_model_dirty();
notify_scene_model_dirty();
}
void Renderable::paint_changed() noexcept {
invalidate_paint();
scene().notify_model_dirty();
notify_scene_model_dirty();
}
void Renderable::render_graph_changed() {