summaryrefslogtreecommitdiff
path: root/servers/rendering_server.cpp
diff options
context:
space:
mode:
authorreduz <reduzio@gmail.com>2020-12-24 00:13:52 -0300
committerreduz <reduzio@gmail.com>2020-12-24 00:13:52 -0300
commit7219f37cb5738190b2b11c27c4e6a9a0ce5ecd30 (patch)
tree1267e7db2c8cae27713e5cdf4b43f75415c341f7 /servers/rendering_server.cpp
parent169159c8aac5807725594145bf029c0ff7ac8ef1 (diff)
Add API to get frame setup time on CPU
Needed for benchmarks
Diffstat (limited to 'servers/rendering_server.cpp')
-rw-r--r--servers/rendering_server.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/servers/rendering_server.cpp b/servers/rendering_server.cpp
index 4dcb7aa79c..73e382a5ba 100644
--- a/servers/rendering_server.cpp
+++ b/servers/rendering_server.cpp
@@ -1817,6 +1817,9 @@ void RenderingServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("is_render_loop_enabled"), &RenderingServer::is_render_loop_enabled);
ClassDB::bind_method(D_METHOD("set_render_loop_enabled", "enabled"), &RenderingServer::set_render_loop_enabled);
+
+ ClassDB::bind_method(D_METHOD("get_frame_setup_time_cpu"), &RenderingServer::get_frame_setup_time_cpu);
+
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "render_loop_enabled"), "set_render_loop_enabled", "is_render_loop_enabled");
BIND_CONSTANT(NO_INDEX_ARRAY);