| 633 | } |
| 634 | |
| 635 | uint32_t optimize_nested_render_instances(wf::scene::node_ptr node, uint32_t flags) |
| 636 | { |
| 637 | if (flags & (update_flag::CHILDREN_LIST | update_flag::ENABLED)) |
| 638 | { |
| 639 | // If we update the list of children, there is no need to notify the whole scenegraph. |
| 640 | // Instead, we can do a local update, and only update visibility. |
| 641 | flags &= ~update_flag::CHILDREN_LIST; |
| 642 | flags &= ~update_flag::ENABLED; |
| 643 | flags |= update_flag::GEOMETRY | update_flag::INPUT_STATE; |
| 644 | node_regen_instances_signal data; |
| 645 | node->emit(&data); |
| 646 | } |
| 647 | |
| 648 | return flags; |
| 649 | } |
| 650 | |
| 651 | render_instance_manager_t::render_instance_manager_t(std::vector<node_ptr> nodes, damage_callback on_damage, |
| 652 | wf::output_t *reference_output) : nodes(nodes), on_damage(on_damage), reference_output(reference_output) |
no test coverage detected