Editor StringName and Viewport optimizations

* Added explicit return type to the SNAME macro.
* Add some extra SNAME usages.
* Change some ClassDB methods to use const StringName & arguments.
* Cache the Window parent in Control because it's used in
  is_layout_rtl(), which is called often.
* Only enable internal processing for viewports that need it.
* Change CanvasItem::group to be a StringName because it's only used as
  that.
This commit is contained in:
Joan Fons
2021-07-19 19:25:15 +02:00
parent b1eee24e26
commit a6adb58493
11 changed files with 80 additions and 66 deletions

View File

@@ -47,9 +47,9 @@ void Container::add_child_notify(Node *p_child) {
return;
}
control->connect("size_flags_changed", callable_mp(this, &Container::queue_sort));
control->connect("minimum_size_changed", callable_mp(this, &Container::_child_minsize_changed));
control->connect("visibility_changed", callable_mp(this, &Container::_child_minsize_changed));
control->connect(SNAME("size_flags_changed"), callable_mp(this, &Container::queue_sort));
control->connect(SNAME("minimum_size_changed"), callable_mp(this, &Container::_child_minsize_changed));
control->connect(SNAME("visibility_changed"), callable_mp(this, &Container::_child_minsize_changed));
minimum_size_changed();
queue_sort();