summaryrefslogtreecommitdiffstats
path: root/scene/register_scene_types.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/register_scene_types.cpp')
-rw-r--r--scene/register_scene_types.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp
index 3727c788fd..2e6759063b 100644
--- a/scene/register_scene_types.cpp
+++ b/scene/register_scene_types.cpp
@@ -293,6 +293,8 @@ static Ref<ResourceFormatSaverShaderInclude> resource_saver_shader_include;
static Ref<ResourceFormatLoaderShaderInclude> resource_loader_shader_include;
void register_scene_types() {
+ OS::get_singleton()->benchmark_begin_measure("Scene", "Register Types");
+
SceneStringNames::create();
OS::get_singleton()->yield(); // may take time to init
@@ -1182,9 +1184,13 @@ void register_scene_types() {
}
SceneDebugger::initialize();
+
+ OS::get_singleton()->benchmark_end_measure("Scene", "Register Types");
}
void unregister_scene_types() {
+ OS::get_singleton()->benchmark_begin_measure("Scene", "Unregister Types");
+
SceneDebugger::deinitialize();
ResourceLoader::remove_resource_format_loader(resource_loader_texture_layered);
@@ -1227,10 +1233,16 @@ void unregister_scene_types() {
CanvasItemMaterial::finish_shaders();
ColorPicker::finish_shaders();
SceneStringNames::free();
+
+ OS::get_singleton()->benchmark_end_measure("Scene", "Unregister Types");
}
void register_scene_singletons() {
+ OS::get_singleton()->benchmark_begin_measure("Scene", "Register Singletons");
+
GDREGISTER_CLASS(ThemeDB);
Engine::get_singleton()->add_singleton(Engine::Singleton("ThemeDB", ThemeDB::get_singleton()));
+
+ OS::get_singleton()->benchmark_end_measure("Scene", "Register Singletons");
}