From 7219f37cb5738190b2b11c27c4e6a9a0ce5ecd30 Mon Sep 17 00:00:00 2001 From: reduz Date: Thu, 24 Dec 2020 00:13:52 -0300 Subject: Add API to get frame setup time on CPU Needed for benchmarks --- servers/rendering/rendering_server_default.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'servers/rendering/rendering_server_default.h') diff --git a/servers/rendering/rendering_server_default.h b/servers/rendering/rendering_server_default.h index 11220dcf79..922cf08f3b 100644 --- a/servers/rendering/rendering_server_default.h +++ b/servers/rendering/rendering_server_default.h @@ -72,6 +72,8 @@ class RenderingServerDefault : public RenderingServer { uint64_t frame_profile_frame; Vector frame_profile; + float frame_setup_time = 0; + public: //if editor is redrawing when it shouldn't, enable this and put a breakpoint in _changes_changed() //#define DEBUG_CHANGES @@ -845,6 +847,8 @@ public: /* TESTING */ + virtual float get_frame_setup_time_cpu() const; + virtual void set_boot_image(const Ref &p_image, const Color &p_color, bool p_scale, bool p_use_filter = true); virtual void set_default_clear_color(const Color &p_color); -- cgit v1.2.3